If you search for `cache_page` decorator than it becomes clear that traditional approach is to use it in now unsupported way:
myview = cache_page(myviewt, timeout) For example here: http://www.google.com/codesearch?hl=ru&sa=N&q=%22+%3D+cache_page%22++lang:python&ct=rr&cs_r=lang:python nobody uses `myview = cache_page(timeout, myview)` syntax. So I suppose this change can broke a lot of third-party apps, for example django-robots and django-mediafiles. > I don't know for certain how many people may be using this idiom, since it was never documented (AFAICT cache_page always documented itself as putting the timeout first and the view function second), so I'm not really sure what (if anything) we should do about it. Not true. cache_page decorator is now documented as putting view first and timeout second. Take a look at http://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-cache Another thought. If key_prefix is deprecated in cache_page decorator maybe it should be also deprecated in CacheMiddleware? On 24 сен, 05:50, Luke Plant <l.plant...@cantab.net> wrote: > On Monday 21 September 2009 20:27:50 Jacob Kaplan-Moss wrote: > > > No, I think this is precisely correct. I've been meaning to do > > exactly what you're proposing for a while myself; just haven't > > gotten around to it. > > > > decorator_from_middleware isn't actually documented anywhere > > > I actually avoided documenting it because it's broken. Once you fix > > it, we should (i.e. I will, if you don't have time) document it. > > OK, it's committed now. (r11586, r11593) > > Technically this is a bug fix (#6371), so it ought to get backported > to 1.1.X. However, it does actually introduce backwards > incompatibilities with cache_page (cache_page still works exactly as > documented, but various people were using various undocumented > features of it). Also, you could argue it is a new feature - "these > decorators now work with methods". > > So, in light of those things, should it be backported to 1.1.X or not? > > Luke > > -- > "Pretension: The downside of being better than everyone else is > that people tend to assume you're pretentious." (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 -~----------~----~----~----~------~----~------~--~---