python - Monkey patch django.util.cache function -
i'm having issues figuring out how monkey patch few functions in django.util.cache
. don't want write own caching middleware, want keys little easier swallow. make_key
property on cache backends doesn't cut either use case.
i've tried adding
from django.utils.cache import _generate_cache_key, _generate_cache_header_key spark_core import middleware _generate_cache_key = middleware._generate_cache_key _generate_cache_header_key = middleware._generate_cache_header_key
at bottom of settings.py
file, didn't have luck that. i'm using per-site cache.
Comments
Post a Comment