Opened 17 years ago
Closed 13 years ago
#6847 closed New feature (fixed)
added namespace fetures to filebased cache
Reported by: | 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):
- remove urllib.quote_plus to the ky;
- create dirs due to namespace.
But I think it will be great if offical adds the feature.
Attachments (1)
Change History (8)
by , 17 years ago
Attachment: | filebased.py added |
---|
comment:1 by , 17 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 16 years ago
milestone: | → post-1.0 |
---|
comment:3 by , 16 years ago
milestone: | post-1.0 |
---|
comment:4 by , 14 years ago
Summary: | added namespace fetures to cache → added 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 , 14 years ago
Type: | → New feature |
---|
comment:6 by , 14 years ago
Severity: | → Normal |
---|
comment:7 by , 13 years ago
Easy pickings: | unset |
---|---|
Resolution: | → fixed |
Status: | new → closed |
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.
Milestone post-1.0 deleted