DEV Community

Valia Havryliuk
Valia Havryliuk

Posted on

1 1

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay