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
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ At the core of NormCache is **normalized row storage**. Unlike traditional query
61
61
-**Single Storage for Model Rows**: Individual database rows are stored once under canonical primary key IDs (`table:r:<id>`).
62
62
-**Lightweight Query Memberships**: Queries cache only a list of primary key IDs (`table:m:<query_hash>`), not full duplicate model attributes.
63
63
-**$O(1)$ Invalidation Without Redis SCAN**: When a model is updated or deleted, NormCache invalidates only that specific row key (`table:r:<id>`) and advances the table version counter (`table:v`). There are no expensive `KEYS` or `SCAN` commands in Redis.
64
-
-**Global Row Freshness**: Every query reading Post #42automatically receives the updated row data on its next fetch, ensuring instant consistency across all application queries without clearing individual query keys.
64
+
-**Global Row Freshness**: While Redis is available for invalidation, every query reading Post #42 receives updated row data on its next fetch without clearing individual query keys.
65
65
66
66
## Automatic Result & Projection Overlay
67
67
@@ -126,6 +126,16 @@ php artisan normcache:flush
126
126
127
127
`flushAll()` and the command advance a global epoch. Old payloads expire naturally; NormCache does not scan Redis keys.
128
128
129
+
## Redis invalidation outages
130
+
131
+
NormCache fails open when Redis is unavailable: the database write succeeds and the affected request bypasses cache access. If only that writer cannot reach Redis while other application nodes can still read it, those nodes can serve stale cached data until the affected entry expires or invalidation later succeeds. NormCache logs this condition at `critical` level with the affected table and invalidation mode.
132
+
133
+
After Redis connectivity is restored, run the global flush to advance the epoch and make any payloads from the outage unreachable:
134
+
135
+
```bash
136
+
php artisan normcache:flush
137
+
```
138
+
129
139
## Temporarily disabling the cache
130
140
131
141
Use the runtime commands when NormCache needs to be paused across all application nodes without changing configuration or redeploying:
0 commit comments