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: cache/docs/SHORT.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,12 +92,22 @@ Immediately clears all cached entries (useful for testing or troubleshooting).
92
92
## Configuration
93
93
94
94
Cache behavior can be adjusted via environment variables:
95
+
-`CACHING` - Enable/disable caching layer (default: `true`, set to `false` to disable)
95
96
-`CACHE_MAX_LENGTH` - Maximum entries (default: 1000)
96
97
-`CACHE_MAX_BYTES` - Maximum memory usage (default: 1GB)
97
98
-`CACHE_TTL` - Time-to-live in milliseconds (default: 300000 = 5 minutes)
98
99
99
100
**Note**: Limits are well-balanced for typical usage. With standard RERUM queries (100 items per page), 1000 cached entries use only ~26 MB (~2.7% of the 1GB byte limit). The byte limit serves as a safety net for edge cases.
100
101
102
+
### Disabling Cache
103
+
104
+
To disable caching completely, set `CACHING=false` in your `.env` file. This will:
105
+
- Skip all cache lookups (no cache hits)
106
+
- Skip cache storage (no cache writes)
107
+
- Skip cache invalidation (no overhead on writes)
108
+
- Remove `X-Cache` headers from responses
109
+
- Useful for debugging or when caching is not desired
0 commit comments