I want to avoid to use database connection to retrieve very repetitive content of my web app.
I would like to know if exists any way to use a memory cache (memcache?) with time expiration and loading feature.
Just to be clear whan I mean for time expiration and loading feature it is something like Java Guava LoadingCache library. A memory storage that expires after a defined time span and then provide a method to retrieve that content externally.
My goal is to use this cache for x seconds after that the content is refreshed from database.
I know the database has its own cache but for sure it makes more overhead than a memory storage.