Johnny cache not invalidating

Even though memcached is a stable and mature caching system, it has subtle nuances that can make it difficult to tame.

Given that our work at 10up frequently involves development within memcached environments, we have become quite familiar with the ins and outs of the tool.

Although the list below is not comprehensive, it does cover the most common caching techniques used.

Although one may think that selecting one or two of the caching techniques above would be enough to ensure a web application remains performant, most of the time, it’s not.

But evil of wrong development practices can slow down the project by significant amount. The eagerness to finish task dominates the efficiency and optimization. I will show how to optimize the Django code and where to optimize. The techniques those can improve our Django website performance: Django ORM is the easiest thing to link an application and a database(My SQL, Postre SQL).

When a developer new to Django writes code, she usually have a bad habit of doing this.

Loading objects into memory and processing is a bad thing.

Fortunately, because our workload skews heavily towards reads, we’ve had success implementing various caching strategies across the stack.

On the application level, we’ve leveraged Django’s built-in caching framework to enable site-wide caching for anonymous users, view level caching for authenticated pages (especially useful for our API), and ad-hoc caching for aggregate queries.


Leave a Reply