edeis53 commented on issue #1704: Redis cache TTL URL: https://github.com/apache/incubator-pagespeed-mod/issues/1704#issuecomment-387566711 I would suggest a default -1 expiry to match current pagespeed config behaviour, and yes we'd probably use a long TTL like 1 year in our config. The default LRU for Redis and also most desirable for our use case is `volatile-lru`: evict keys by trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added. Without a TTL set from pagespeed, the pagespeed cached keys will never be purged using a volatile-lru policy. To prevent running out of cache space with pagespeed, redis imlementations are forced to use `allkeys-lru`: evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. `allkeys-lru` policy is a problem if you are sharing the redis cache with other applications and there are keys that you wish to persist as they may be purged before some ephemeral keys. By defining a ttl and using `volatile-lru` you can explicitly declare which keys you want to evict as the cache fills up.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services