Skip to content

Is there any way to prevent infinite growth except from timeouts? #107

Answered by jodydonetti
Strepto asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! Great library and impressive docs!

Thanks! I'm glad you are liking it 🙂

But I did not find an answer to the question in the title:
Is there any way to prevent infinite growth in the MemoryCache except from using timeouts?
[...]
The use-case is for a API for a read-only SQLite-database cache layer where the query responses are idempotent (the response for a query never changes). The SQLite database files are replaced daily, so a cache time of ~24 hours is preferred, but if memory is spent the oldest request should be removed from memory.

Interesting use-case, I never seen something like this! Would you be willing to explain more?
Like, is SQLite used as a 2nd level, did I get this…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Strepto
Comment options

@jodydonetti
Comment options

Answer selected by Strepto
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