Apps Script CacheService Eviction and Other Limits

Published: (December 23, 2025 at 01:51 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Apps Script CacheService Limits

FeatureComputed LimitBehavior
Key Length250 charactersStrict. Throws error if exceeded.
Value Size100 KB (102,400 bytes)Strict. Throws error if exceeded.
Eviction PolicyFIFORemoves items based on creation time, ignoring recent access. Removes ~100 items (≈10 %) at once when full.
Edge CasesPermissiveCoerces 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: .

Back to Blog

Related posts

Read more »

C# Smart Enums: advanced

!Cover image for C Smart Enums: advancedhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-upload...