Just a thought while writing a query for some data that could be globally cached. It's a bit risky due to memory constraints, but it'd be nice to be able to have a database query that runs on startup and populates an in-memory cache somewhere like process.databases.caches.<cache_name>.
That way, for example, if I reuse the same data over and over again (like a list of users with a role), I can set the cache once and then just read from that in my code (and if I want to update it, I can just run a cron to patch the cache on some interval).
Just a thought while writing a query for some data that could be globally cached. It's a bit risky due to memory constraints, but it'd be nice to be able to have a database query that runs on startup and populates an in-memory cache somewhere like
process.databases.caches.<cache_name>
.That way, for example, if I reuse the same data over and over again (like a list of users with a role), I can set the cache once and then just read from that in my code (and if I want to update it, I can just run a cron to patch the cache on some interval).