Regarding key_prefix parameter: it's all simply about that:
http://code.djangoproject.com/ticket/11269
My proposal was to move things in opposite direction: to promote
`key_prefix` parameter, document it and make it more useful. If it is
an 'Design decision needed'-type of issue and design decision is made
then OK :)


On 23 сен, 03:16, Luke Plant <l.plant...@cantab.net> wrote:
> On Tuesday 22 September 2009 20:37:05 kmike wrote:
>
> > cache_page decorator previously used to have optional
> >  'key_prefix' argument, not only timeout. Is it gone? Can I use
>
> > @cache_page(3600, key_prefix='vasia')
> > def my_func(request)
> >    ...
>
> That wasn't documented anywhere as far as I can see, so now it's
> gone. I had to make some decision about how far the backwards
> compatibility went, and current policy is to go with documented API,
> which explicitly says "cache_page takes a single argument: the cache
> timeout, in seconds." [1]
>
> If there is some documentation/tutorial about the key_prefix
> argument, or if this change is going to cause lots of breakage,
> perhaps we'll have to revisit this.
>
> For the time being, you can create a 'cache_page' decorator that
> does what you want very easily, as in the example below.
>
> James B - do we have a place to list things like this i.e. things
> that probably should go in release notes?
>
> > Another question: in 'decorator_from_middleware_with_args'
> >  docstring example stated:
> > Use like::
>
> >     cache_page = decorator_from_middleware(CacheMiddleware)
>
> > Is it correct?
>
> Nope, should be decorator_from_middleware_with_args of course,
> thanks, will fix.
>
> Luke
>
> [1]http://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-
> cache
>
> --
> "Pessimism: Every dark cloud has a silver lining, but lightning
> kills
> hundreds of people each year trying to find it." (despair.com)
>
> Luke Plant ||http://lukeplant.me.uk/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to