oxhq/cachelet-request
最新稳定版本:v0.3.0
Composer 安装命令:
composer require oxhq/cachelet-request
包简介
Request and response caching integration for Cachelet.
README 文档
README
Route response caching with explicit vary dimensions and Cachelet coordinates.
cachelet-request turns response caches into inspectable request-family entries with route metadata, vary inputs, namespace invalidation, and safe bypass behavior.
Install
composer require oxhq/cachelet-request
Best Fit
Use this package when route responses are expensive, cacheable, and need explicit vary rules.
It provides:
- route
->cachelet()integration - middleware-driven response caching
- vary by query string, headers, locale, and authenticated user
- namespace invalidation for request caches
- bypass behavior for streamed, binary, and non-cacheable responses
- canonical
module = requestcoordinates and telemetry
Example
Route::get('/users', UserIndexController::class) ->name('users.index') ->cachelet(600, [ 'vary' => ['query' => true, 'auth' => true], 'namespace' => 'users', ]);
Contract
Defaults in 0.2.x:
- cacheable methods:
GET,HEAD - cacheable statuses:
200 - streamed and binary responses are bypassed
- non-cacheable SWR refresh callbacks preserve the last good cacheable payload
Docs
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-20