cache_page works as wrapper function, not as decorator
|Reported by:||Jaroslaw Zabiello <hipertracker@…>||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:1 Changed 9 years ago by mtredinnick
- priority changed from highest to normal
- Severity changed from blocker to normal
comment:2 Changed 9 years ago by yportne@…
- Summary changed from Cache does not work on win32 to Cache does not work
comment:3 Changed 9 years ago by adrian
- Summary changed from Cache does not work to Cache does not work for some indeterminate setup
comment:11 Changed 9 years ago by Simon G. <dev@…>
- Summary changed from Cache does not work for some indeterminate setup to cache_page works as wrapper function, not as decorator