#how do I cache data from db
10 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @wind garden! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Caching is a huge topic
it would help if you could narrow down what you want more
do you want to cache
- In memory, forever (ConcurrentHashMap might be a good use)
- In memory, with custom expiration logic (the caffiene library would be good)
- Out of memory, shared between nodes (hello redis)
- In memory, but implicitly because you are doing ORM nonsense
- ...
Also, unless it's absolutely performance critical, DON'T