What is the standard time-to-live for the in-memory cache?

The docs just say it is “short-lived”, but what does that mean exactly? Are there plans to make this configurable?

Hi @becknaum :wave:

For Apollo iOS, at the moment, it’s best to think of “short-lived” as simply volatile or non-persisted. The cache in Apollo iOS is a naive implementation of a very simple data store. You can see in the implementation of InMemoryNormalizedCache that all the cache records are stored in a local property records which is just a Swift Dictionary of type RecordSet.

There is no Time to live (TTL) nor memory size constraint implementation. We do have plans to completely overhaul the cache functionality in a future major version, currently v3.0 in our Roadmap, although that is admittedly a while away from now.

tl;dr - “short-lived” specifically means “while your app is alive and in memory”.