apollo-kotlin
apollo-kotlin copied to clipboard
SQLite Cache Age and Eviction APIs
Without a proper Eviction API, SQLite caches can grow forever and take up a lot of space on the device, leading to unexpected situations and performances (no storage left, db slow to open/query etc...).
Usually, a good strategy for SQLite eviction is to remove entries that were written a long time ago (example: 10 days). For this to work, the write data needs to be stored with each record or row, and an Eviction API to be made available when building the SqlNormalizedCacheFactory.