-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature Request: Add cacheExpireTime
to invalidation data store
#54
Comments
Hey there! Thanks for the suggestions. Let me follow up:
Thanks for these proposals! |
Hey @danReynolds,
const expiredEntities = client.cache.expiredEntities();
const isExpiredTTL = expiredEntities.find(
(id: string) => id === client.cache.identify(item)
); This is pretty simple to be honest, perhaps we don't need a function for this but I though it could be nice to make this in one call. Note the reason I'm doing this is simply for debugging at the moment, I just want to show whether an entity has an active or expired TTL. Screen.Recording.2022-06-25.at.7.33.05.pm.mov
Perhaps we could have a function which returns a boolean and a function which which tell me the time it will expire?
Note getting its cache time would also be quite useful:
|
I agree! All three of those APIs sound useful. Feel free to look into that, I'd be happy to add them as well next week so whatever works. |
Hey @danReynolds, sounds great, I'll try and get around to this in the week 🙇 |
Hi, before I raise a PR I would love to add the following possible improvements:
isExpired
helper to return a boolean as to whether TTL has passed for record.cacheExpireTime
to the invalidation data store so we can see this next to thecacheTime
of the record as defined below:Do you see any implications with adding these improvements?
The text was updated successfully, but these errors were encountered: