Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a way to cache data to the process in memory #367

Open
rglover opened this issue Dec 6, 2023 · 0 comments
Open

Have a way to cache data to the process in memory #367

rglover opened this issue Dec 6, 2023 · 0 comments
Assignees
Labels
feature Something new to add
Projects

Comments

@rglover
Copy link
Contributor

rglover commented Dec 6, 2023

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).

@rglover rglover added the feature Something new to add label Dec 6, 2023
@rglover rglover self-assigned this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new to add
Projects
1.x.x
Awaiting triage
Development

No branches or pull requests

1 participant