cache_page works as wrapper function, not as decorator
|Reported by:||Owned by:||Jacob|
|Component:||Core (Cache system)||Version:||master|
|Severity:||normal||Keywords:||cache win32 linux freebsd|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There are severe issues with cache settings and implementations for *Windows* (it was tested on Windows XP Pro SP2 with fresh SVN version of Django). Eg.
CACHE_BACKEND = 'file:///c:/tmp/cache'
the following error is displayed:
EnvironmentError at /test/ Cache directory '/c:/tmp/cache' does not exist and could not be created'
So I switched to database (table cache is existing of course)
CACHE_BACKEND = 'db://cache' CACHE_MIDDLEWARE_SECONDS = 30
But then I have another error:
AttributeError at /test/ 'function' object has no attribute 'method' Request Method: GET Request URL: http://localhost:8000/test/ Exception Type: AttributeError Exception Value: 'function' object has no attribute 'method' Exception Location: c:\opt\python24\lib\site-packages\Django-0.95-py2.4.egg\django\middleware\cache.py in process_request, line 47
Change History (13)
comment:3 Changed 10 years ago by
|Summary:||Cache does not work → Cache does not work for some indeterminate setup|
comment:11 Changed 10 years ago by
|Summary:||Cache does not work for some indeterminate setup → cache_page works as wrapper function, not as decorator|