Caching backends
See original GitHub issueHello! I think it would be interesting having a section in Starlette docs documenting how to use caching as this is something you end up doing typically for lots of services.
I’m the maintainer of aiocache which is a caching framework agnostic to any http framework. I could write docs about things like:
- how to use aiocache with starlette for caching
endpoints
- how to write configuration for caching and load it when starting a Starlette app
Any other thing you could think of you usually do when setting caching for your app. Also happy to receive comments, issues and PRs if you think there is anything missing to integrate nicely with Starlette 😃.
Would you be interested on me providing a PR documenting that? A new section called “Caching” in https://www.starlette.io/ maybe?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:28 (17 by maintainers)
Top Results From Across the Web
Configuring cache backends - Apollo GraphQL Docs
You can specify a cache backend by passing a cache option to the ApolloServer constructor. Your specified cache backend must implement the KeyValueCache ......
Read more >What is Caching and How it Works - AWS
Database caching allows you to dramatically increase throughput and lower the data retrieval latency associated with backend databases, which as a result, ...
Read more >Backend Caching - cBioPortal Docs
cBioPortal provides the option of caching information on the backend to improve performance. Without caching, every time a request is received by the ......
Read more >Cache storage backends - Docker Documentation
Cache storage backends. To ensure fast builds, BuildKit automatically caches the build result in its own internal cache.
Read more >Django's cache framework
Unlike other cache backends, the database cache does not support automatic ... To use this backend set BACKEND to "django.core.cache.backends.filebased.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patrys Yup, and if you look closely you’ll see that
async-caches
is a dependency forasgi-caches
. I initially thought of adding the ASGI functionality toasync-caches
via a PR, but figured that the nice frontier between the generic async world (async-caches
) and the ASGI world (asgi-caches
) would make things easier to maintain and iterate. As with many third-party ASGI libraries, there is room on my side for eventually merging it into Starlette, provided built-in caching support in Starlette is on the roadmap.yep, that’s what I thought and why I think its complex to support this, but not sure if passing the whole request object all the way is a common pattern for users.
yeh not 100% comfortable with this though, there are many things involved in a request that can make it different. I’ll go with an example showing how to cache an expensive function call and an http caching middleware plus how to link this with the config. Once I’ll have it we can discuss a bit more with real examples 😃