jaydoane edited a comment on issue #2331: Expiring cache URL: https://github.com/apache/couchdb/pull/2331#issuecomment-562283396 ``` (?EXPIRING_CACHE, Name, ?PK, Key) := (Val, StaleTS, ExpireTS) (?EXPIRING_CACHE, Name, ?EXP, ExpireTS, Key) := () ``` @nickva I think the main issue with this schema is that if application `Name` is retired, or changes its name while there are still unexpired cache entries, those entries will remain as garbage indefinitely in FDB without a way to get cleaned up. We could of course create a registry for cache names similar to how job types are registered, but that adds complexity. Not sure if there's a simpler way to do it, or whether it's even a real concern. I suppose we could just create a `cleanup` function that should be called (manually) when a `Name` is retired/changed? EDIT: It occurs to me that it's possible to clear all keys under the `(?EXPIRING_CACHE)` prefix, which is sort of the "nuclear option" for key cleanup, but since this is just a cache, it seems like a relatively benign way to ensure any garbage from abandoned `Name`s gets cleared. In short, I agree that overall this change is a substantial improvement, and an update is in the works!
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
