Skip to content

Commit 8d6ffc7

Browse files
freekmurzeclaude
andcommitted
Improve flexible caching description in README and docs intro
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ed64690 commit 8d6ffc7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Route::middleware(CacheResponse::for(minutes(10)))->group(function () {
3030
});
3131
```
3232

33-
You can also use stale-while-revalidate caching for data that can be briefly stale:
33+
For pages where brief staleness is acceptable, you can use flexible caching. After the lifetime expires, the stale response is still served instantly while the cache refreshes in the background. Once the grace period is over, the cache is considered expired and the next request will be fully recalculated:
3434

3535
```php
3636
use Spatie\ResponseCache\Middlewares\FlexibleCacheResponse;

docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Route::middleware(CacheResponse::for(minutes(10)))->group(function () {
1818
});
1919
```
2020

21-
You can also use stale-while-revalidate (SWR) caching for data that can be briefly stale:
21+
For pages where brief staleness is acceptable, you can use flexible caching. After the lifetime expires, the stale response is still served instantly while the cache refreshes in the background. Once the grace period is over, the cache is considered expired and the next request will be fully recalculated:
2222

2323
```php
2424
use Spatie\ResponseCache\Middlewares\FlexibleCacheResponse;

0 commit comments

Comments
 (0)