Technologies/Redis/django.cache.hits
RedisRedisMetric

django.cache.hits

Successful cache retrievals
Dimensions:None

Technical Annotations (34)

Configuration Parameters (9)
shared_buffers
PostgreSQL memory cache size - increase if cache hit ratio is low
timeoutrecommended: 60 * 60
Cache expiry in seconds; example shows 1 hour for redis_cache.set()
CACHES.BACKENDrecommended: django.core.cache.backends.memcached.PyMemcacheCache
Memcached backend loses data on restart
CACHES.OPTIONS.CULL_FREQUENCYrecommended: 3
default value; 0 dumps entire cache, 2 culls half, 3 culls one-third
CACHES.OPTIONS.MAX_ENTRIESrecommended: 300
cache capacity threshold that triggers culling
key_prefixrecommended: unique prefix per view
Set in @cache_page decorator to enable programmatic cache key discovery
CACHES.default.BACKENDrecommended: django_redis.cache.RedisCache
Preferred over django.core.cache.backends.db.DatabaseCache for performance
LOCATIONrecommended: 127.0.0.1:11211
must point to running Memcached server address and port
HITCOUNT_CACHErecommended: cached_hitcount
Must match a key in Django CACHES settings dict
Error Signatures (1)
ConnectionRefusedError: [Errno 111] Connection refusedexception
CLI Commands (4)
./manage.py shelldiagnostic
cache.has_key('/post/1234/')diagnostic
cache.has_key('domain.com/post/1234/')diagnostic
cache.has_key('www.domain.com/post/1234/')diagnostic
Technical References (20)
Django Debug Toolbarcomponentcache panelcomponentRediscomponentdjango_cache_get_hits_totalcomponentdjango_cache_get_misses_totalcomponentTTLconceptpost_savecomponentpost_deletecomponentcache keyconceptRedisCachecomponentredis_cache.setcomponent@cache_pagecomponentget_cache_keycomponentdefault_key_funccomponentcache_pagecomponentabsolute_uriconceptdjango.core.cachecomponentMemcachedCachecomponentmemcachecomponentCACHEScomponent
Related Insights (15)
Low cache hit ratio indicates ineffective cache configurationinfo
Repeatedly called endpoints without caching increase database loadwarning
Cache hit ratio below 70% indicates inefficient cachingwarning
Stale cached QuerySet data from missing invalidationwarning
Cache key without authorization context causes unauthorized data accesscritical
Database bottleneck causes response time spikes during high trafficwarning
Improper cache expiry time causes stale data or server overloadwarning
Memcached data loss on server crash or restartwarning
CULL_FREQUENCY=0 causes full cache dump at capacitywarning
Page cache invalidation requires complex manual key managementinfo
Database cache backend defeats primary caching purposewarning
Stale cache served after updates due to key mismatchwarning
Memcached server unreachable causes connection refusedcritical
Memcache unavailability prevents hit trackingwarning
Cache hit ratio below 85% indicates optimization neededwarning