added namespace fetures to filebased cache
|Reported by:||xinbin <xinbin@…>||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||master|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||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\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.
Change History (8)
Changed 8 years ago by xinbin <xinbin@…>
comment:1 Changed 7 years ago by anonymous
- Needs documentation set
- Needs tests set
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
comment:4 Changed 5 years ago by otherjacob
- Summary changed from added namespace fetures to cache to added namespace fetures to filebased cache