0PricingLogin
Django Academy · Lesson

Template Fragment Caching

Cache just the expensive parts of a page.

Cache Just One Piece

Often only part of a page is slow. Fragment caching lets you cache that one block while the rest renders fresh each time.

Load the cache Tag

Fragment caching lives in a template tag library, so start your template with load cache to make it available.

{% load cache %}

All lessons in this course

  1. Cache Backends and Redis
  2. Per-View and Per-Site Caching
  3. Template Fragment Caching
  4. Low-Level cache API and Invalidation
← Back to Django Academy