Skip to content

Commit 8015dd2

Browse files
committed
docs: Put noStore example first as most common use case
- Start with noStore (most frequently used for API responses) - Emphasize explicit intent to disable caching - Mention NoHttpCache as simpler alternative - Reflect actual usage frequency in example order
1 parent e256166 commit 8015dd2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src-annotation/HttpCache.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
*
1818
* Example:
1919
* ```php
20+
* // Disable caching (most common use case)
21+
* #[HttpCache(noStore: true)]
22+
* // Or use #[NoHttpCache] for simplicity
23+
*
2024
* // Cache for 1 hour
2125
* #[HttpCache(maxAge: 3600)]
2226
*
@@ -28,8 +32,6 @@
2832
*
2933
* // CDN cache for 1 hour, browser cache for 5 minutes
3034
* #[HttpCache(maxAge: 300, sMaxAge: 3600)]
31-
*
32-
* // For no caching, use #[NoHttpCache] instead
3335
* ```
3436
*
3537
* Interceptors bound:

0 commit comments

Comments
 (0)