What Steps Are Needed To Implement Memcached In A Django Application?
Solution 1:
What you've done is just a set up of a Cache Backend.
In order to benefit from caching you need to find the places where it is appropriate and would have a positive impact on performance: your views, templates..you can cache the whole views, templates, template fragments etc.
If you want some automation to help you, take a look at Johnny Cache package:
Johnny Cache is a caching framework for django applications. It works with the django caching abstraction, but was developed specifically with the use of memcached in mind. Its main feature is a patch on Django’s ORM that automatically caches all reads in a consistent manner.
Or django-cache-machine
package:
Cache Machine provides automatic caching and invalidation for Django models through the ORM.
There is also an interesting project called django-cacheops
that is aiming to improve Django ORM caching, but it uses Redis
backend.
Also, django_debug_toolbar
s caching panel can help you in the future.
Note that django querysets have a built-in internal cache, but it has nothing to do with a cache framework.
Further reading:
Post a Comment for "What Steps Are Needed To Implement Memcached In A Django Application?"