Opened 17 years ago

Closed 13 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: dev
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

Description

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\filebased.py):

  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)

filebased.py (2.5 KB ) - added by xinbin <xinbin@…> 17 years ago.

Download all attachments as: .zip

Change History (8)

by xinbin <xinbin@…>, 17 years ago

Attachment: filebased.py added

comment:1 by anonymous, 17 years ago

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

comment:2 by Julian Bez, 16 years ago

milestone: post-1.0

comment:3 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 by otherjacob, 14 years ago

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 by Julien Phalip, 14 years ago

Type: New feature

comment:6 by Julien Phalip, 14 years ago

Severity: Normal

comment:7 by Alex Gaynor, 13 years ago

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