Apps Script CacheService Eviction and Other Limits
Source: Dev.to
Apps Script CacheService Limits
| Feature | Computed Limit | Behavior |
|---|---|---|
| Key Length | 250 characters | Strict. Throws error if exceeded. |
| Value Size | 100 KB (102,400 bytes) | Strict. Throws error if exceeded. |
| Eviction Policy | FIFO | Removes items based on creation time, ignoring recent access. Removes ~100 items (≈10 %) at once when full. |
| Edge Cases | Permissive | Coerces types to strings. Negative expiration is ignored/stored. |
The cache eviction follows a FIFO strategy, which eventually evicts items after the cache reaches 1,000 entries, clearing roughly 10 % of the entries at a time.
Further details can be found in my analysis of CacheService: .
You might also be interested in my post on key‑value stores for Apps Script: .