Opened 13 years ago

Closed 9 years ago

#6847 closed New feature (fixed)

added namespace fetures to filebased cache

Reported by: xinbin <xinbin@…> Owned by: nobody
Component: Core (Cache system) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


In my project, I will generate more than 1000,000 cache files to avoid the list page querying database. So many files lying in a single directory is not a good thing.
I begin to think if there's a way diving them to different directories, just like namespace. Unluky, I found nothing in google. I beigin to modify the core code.
Finally I succeed, the changes are in a file (D:\Python25\Lib\site-packages\django\core\cache\backends\

  1. remove urllib.quote_plus to the ky;
  2. create dirs due to namespace.

But I think it will be great if offical adds the feature.

Attachments (1) (2.5 KB) - added by xinbin <xinbin@…> 13 years ago.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by xinbin <xinbin@…>

Attachment: added

comment:1 Changed 12 years ago by anonymous

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 12 years ago by Julian Bez

milestone: post-1.0

comment:3 Changed 12 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 Changed 10 years ago by otherjacob

Summary: added namespace fetures to cacheadded namespace fetures to filebased cache

clarifying the ticket -- #13795 adds "namespace" features for most caches, but this is specific to filebased cache backend.

I may be able to pick this up for 1.4

comment:5 Changed 10 years ago by Julien Phalip

Type: New feature

comment:6 Changed 9 years ago by Julien Phalip

Severity: Normal

comment:7 Changed 9 years ago by Alex Gaynor

Easy pickings: unset
Resolution: fixed
Status: newclosed
UI/UX: unset

This appears to have been done at some point, django computes the md5 of teh key, and creates sub directories for teh first two, and second two characters of it.

Note: See TracTickets for help on using tickets.
Back to Top