DEV Community

Valia Havryliuk
Valia Havryliuk

Posted on

Cache in asynchronous Python applications

Modern Internet would be impossible without caching. It is present literally everywhere in the web app: browser keeps its own cache to speed up page loading, CDN helps to serve static files faster, databases use buffer cache to optimize i/o operations on high rate queries. And applications are no exception. Unfortunately, most applications don’t use caching as much as they could. This is because developers typically use caching as a last resort to speed up a slow application. Caching also adds some overhead to an application: keeping the cache consistent and invalidate it at the right time is not an easy task.

In the article, we will talk about caching techniques in asynchronous Python applications. First, we’ll try to implement it on our own and then will take a look at third-party libraries.

Why asynchronous python, exactly? Regular python already has a lot of production-ready third-party libraries. Also, async python gives us some interesting possibilities, for example, we can run multiple coroutines to manage the cache.

Learn more: https://medium.com/the-pandadoc-tech-blog/cache-in-asynchronous-python-applications-aa83157af712

Top comments (0)