0Pricing
Django Academy · Lesson

Low-Level cache API and Invalidation

Cache query results and bust stale keys.

Cache Anything You Like

The low-level cache API lets you store any Python object, like a query result, with full control over the key and timeout.

Import the cache Object

Reach for the shared cache object from django.core.cache to call its methods anywhere in your views or services.

from django.core.cache import 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