You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-14Lines changed: 8 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@
7
7
[](https://packagist.org/packages/kai-init/laravel-normcache)
Normcache caches query results as ID lists and stores model attributes in versioned model keys. When a model changes, Normcache bumps a version key instead of scanning and deleting every query that may have returned that model.
10
+
Normcache caches model-query results as ID lists and stores model attributes in versioned model keys. When a model changes, Normcache bumps a version key instead of scanning and deleting every query that may have returned that model.
Redis Cluster sharding is now fully atomic within each cache space. Normcache keeps the keys for a cached operation and its valid dependencies in one hash slot, so cache reads, rebuilds, and invalidation coordination remain atomic.
47
47
@@ -55,7 +55,6 @@ Redis Cluster sharding is now fully atomic within each cache space. Normcache ke
55
55
Normal Eloquent reads are cached automatically for cacheable models:
56
56
57
57
```php
58
-
Post::all();
59
58
Post::where('active', true)->get();
60
59
Post::find(1);
61
60
Post::paginate(20);
@@ -74,18 +73,12 @@ Simple `whereHas` / `whereDoesntHave` constraints on cacheable relations and pla
- reads forced to the write connection with `useWritePdo()`
231
225
- reads inside a database transaction
232
226
-`DB::table(...)`, `DB::select()`, and raw SQL
233
227
@@ -244,11 +238,11 @@ Other limitations:
244
238
- Models should use standard single-column primary keys.
245
239
- Writes outside Eloquent are invisible unless you manually flush or invalidate.
246
240
- Packages that replace Eloquent builders, relation classes, or hydration behavior may bypass parts of Normcache.
247
-
- Normcache caches model connection/table metadata. Call `CacheKeyBuilder::reset()` after switching tenants dynamically.
241
+
- Normcache caches model connection/table metadata. Call `NormCache\Support\CacheKeyBuilder::reset()` after switching tenants dynamically.
248
242
249
243
## Observability
250
244
251
-
When events are enabled, Normcache dispatches query/model hitand miss events. When `fruitcake/laravel-debugbar` is installed and `normcache.debugbar` is enabled, cache hits, misses, bypasses, and model fetches appear in Debugbar.
245
+
When events are enabled, Normcache dispatches cache hit, miss, bypass, metric, and invalidation events. When `fruitcake/laravel-debugbar` is installed and `normcache.debugbar` is enabled, cache hits, misses, bypasses, and model fetches appear in Debugbar.
0 commit comments