Here are the key approaches to caching in Django:
- Per site caching (generic approach) - Cache entire pages without GET/POST parameters and only for anonymous users.
- Per view caching (granular approach) - Cache responses of individual views by decorating them with @cache_page and setting timeouts.
- Template fragment caching (micro manage approach) - Cache fragments of templates, both static and dynamic, by using the {% cache %} tag and specifying keys.
- Low level caching (micro micro manage) - Cache individual parameters by storing and retrieving from the cache backend directly in the views.
The level of caching ranges from generic site-wide caching to fine-grained fragment caching. Per view and