Replies: 2 comments 1 reply
-
So, cache is available in route handlers via As for extending the protocol and |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We started discussing it here: #534, but it's probably worth its own thread.
To the best of my knowledge, Starlite currently uses the cache for internal purposes such as caching responses and rate limiting (let me know if I'm missing something). However, the cache is already exposed to users through
app.cache
, so I'm wondering if we should extend the cache capabilities and let users use it for any purpose. We can use Django’s cache framework as an inspiration.If we want to do that we should also think how to expose it better in route handlers and controllers.
Please let me know what you think. Maybe it is out-of-scope for Starlite, which I can totally understand, and we should close this discussion. I'm just thinking that for many real-life applications, cache and DB are pretty basic infrastructure, and if Starlite facilitates them it can reduce the number of integrations and complexity for users to build their applications.
Beta Was this translation helpful? Give feedback.
All reactions