So I'm writing a library that allows users to interact with memcache in 
more interesting ways. In order to utilize this library, extra kwargs were 
added to `get()` and `set()` that are expected to exist when interacting 
with the cache. In order to get django to use and understand this 
additional functionality, I had to write a custom cache middleware. No big 
deal so far. My only gotcha is that this will only work for whole-site 
caching when specifying the my custom cache middleware class in 
`MIDDLEWARE_CLASSES`. It doesn't, however, work for `@cache_page` which 
uses `decorator_from_middleware_with_args(CacheMiddleware)`. It directly 
references `CacheMiddleware` which is the provided cache middleware from in 
django core. I would love to write a patch that allows the user to specify 
an alternate `CACHE_MIDDLEWARE` setting that is a string representation of 
a class and is then referenced in "utils/decorators.py" with the default 
being the provided `CacheMiddleware`.
I was hoping for some feedback before submitting the patch. Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2a3e2f0b-c4b2-4dcc-9e66-a40f8c4f9c36%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to