Why the limits shape everything
CacheService stores strings only, caps each entry at roughly 100KB of string data, and enforces a hard 6-hour (21,600 seconds) TTL ceiling — passing a larger number to cache.put() silently clamps to 21,600. The service itself can evict entries before that ceiling for capacity reasons, which is why the contract is advisory: cache.get() returning null is not a bug, it's a normal path you must handle every time.
The 100KB ceiling applies to the serialized string, not the raw object. A response from a verbose API like Google Sheets or a paginated REST endpoint can easily blow past it. The practical fix is to cache the derived result rather than the raw payload — extract only the fields the script actually uses, serialize that, then check payload.length before calling cache.put(). Storing a 350KB raw response just silently fails with no error thrown; you only notice when every execution hits the network.