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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -