#13795: Add CACHE_KEY_PREFIX setting that prefixes the low-level cache API -----------------------------------+---------------------------------------- Reporter: bruth | Owner: bruth Status: assigned | Milestone: 1.3 Component: Cache system | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -----------------------------------+---------------------------------------- Changes (by bruth):
* stage: Ready for checkin => Accepted Comment: I have an addition to the patch based on a suggestion from Jacob regarding cache versioning. I wrote a post yesterday on google groups, but it seems like it never got posted. I will reiterate here. Based on Eric Flo's http://github.com/ericflo/django-newcache cache backend, I think adding a CACHE_VERSION works well as a base setting, but more flexibility at runtime can be added by allowing for passing in a version keyword arg when getting/setting cache values: {{{ cache.set('key', 'value', version=2) cache.get('key', version=1) # None }}} The default version will be CACHE_VERSION, but being able to pass a version during runtime could allow for more flexible cache versioning such as syncing versions of cache between multiple objects like a page and its components and cache invalidation, e.g. if the page's version is 2, and its components' version is 1, rebuild and cache. Thoughts? -- Ticket URL: <http://code.djangoproject.com/ticket/13795#comment:9> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.