Skip to content

What's bring naming keepUnusedDataFor instead of CacheLifetime? #1514

Answered by phryneas
ryota-murakami asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm. Good question. No idea why I chose this honestly.

CacheLifetime or ExpireDate would both not describe what it does - they key is the "unused" aspect here - keeping data around after no component has subscribed to it any more. CacheLifetime would imply a lifetime after something has entered the cache - but as long as it is subscribed, there will not be any expiration. Same goes for expireDate - that is a fixed date in the future. As long as that data is being used, we don't know it yet.

So it is the time that unused data is still being kept in the cache - as an option: { keepUnusedDataFor: 60 /* seconds */ }.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ryota-murakami
Comment options

Answer selected by ryota-murakami
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants