turbotux
turbotux

Reputation: 412

django template fragment cache not working

I am working on a Django 1.10.1 site and attempting to use fragment caching. However I am not seeing any cache sets or hits in memcached which is the configured backend. If I set a full view cache it caches fine into memcache. Example:

{% load cache %}
... some html ...
{% cache 600 content %}
... some html and template tags ...
{% end cache %}

The only change to settings for caching I have made is to setup the backend.

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
    },
}

Upvotes: 1

Views: 820

Answers (0)

Related Questions