Repository navigation
Using cachier with client-query-cache to cache MongoDB reads (sync + asyncio)
#409
alessio-locatelli
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone!
I'm the maintainer of client-query-cache, a Python library that caches PyMongo reads with automatic invalidation through MongoDB change streams.
I recently put together an example showing how it can work alongside cachier's MongoDB backend, using the existing
mongetterinterface:https://alessio-locatelli.github.io/client-query-cache/stable/examples/cachier/
The two libraries handle different layers of caching:
The example includes runnable synchronous and asyncio implementations, along with a demonstration of cache clearing and the consistency limitations.
One important distinction: changes to the underlying data do not automatically invalidate cachier's stored function results. Cachier remains responsible for their expiration and clearing.
I thought this might be useful to cachier users already using MongoDB, so I wanted to share it here. Feedback, suggestions, or corrections are very welcome!
Thanks for maintaining cachier!
All reactions