Django

Code

Ticket #11299 (new)

Opened 8 months ago

Last modified 8 months ago

Pluggable cache key algorithm

Reported by: ludo Assigned to: nobody
Milestone: Component: Cache system
Version: 1.0 Keywords:
Cc: Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

There are certain situations when you need to preserve path details in the generated cache keys, for example when using a hyerarchical cache that lets you expire whole branches of a site. The current way in which cache keys are built by Django loses all path information as keys are opaques, and furthermore it's impossible for a user to override it, short of monkeypatching utils.cache.get_cache_key() and utils.cache._generate_cache_header_key().

It might be useful to add a config setting where the user can specify a couple of generic functions to use instead of the default ones. It will take little work, and make the cache engine much more extensible for advanced uses.

Attachments

Change History

06/17/09 17:02:21 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

Add/Change #11299 (Pluggable cache key algorithm)




Change Properties
Action