Skip to content

Commit 2a64b43

Browse files
committed
docs: Remove noStore example, encourage NoHttpCache instead
- HttpCache is for configuring cache control, not disabling it - NoHttpCache is the dedicated attribute for disabling cache - Keep HttpCache examples focused on actual cache configuration - Better separation of concerns between attributes
1 parent ae2efba commit 2a64b43

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src-annotation/HttpCache.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@
1717
*
1818
* Example:
1919
* ```php
20+
* // Cache for 1 hour
21+
* #[HttpCache(maxAge: 3600)]
22+
*
23+
* // Cache with revalidation when stale
24+
* #[HttpCache(maxAge: 3600, mustRevalidate: true)]
25+
*
26+
* // Private cache (not shared cache like CDN)
27+
* #[HttpCache(isPrivate: true, maxAge: 300)]
28+
*
2029
* // CDN cache for 1 hour, browser cache for 5 minutes
2130
* #[HttpCache(maxAge: 300, sMaxAge: 3600)]
2231
*
23-
* // Private cache with revalidation
24-
* #[HttpCache(isPrivate: true, mustRevalidate: true, maxAge: 60)]
25-
*
26-
* // For no caching, use #[NoHttpCache] instead
32+
* // For disabling cache, use #[NoHttpCache] instead
2733
* ```
2834
*
2935
* Interceptors bound:

0 commit comments

Comments
 (0)