On Wed, Aug 7, 2013 at 8:10 PM, Daniele Procida <[email protected]> wrote:
> On Wed, Aug 7, 2013, Aymeric Augustin <[email protected]> > wrote: > > >2013/8/6 Daniele Procida <[email protected]> > > > >> Is there any reason why django.utils.functional.cached_property should > not > >> be documented, so that it can easily be used? > >> > >> <https://code.djangoproject.com/ticket/20870> > >> > > > >Yes, it's stable enough. > > > >The main drawback of the current implementation is that it's impossible to > >clear the cached value. That should be mentioned in the docs. > > Better still -- if we're going to formalise this as a public API, lets update the implementation so that we *can* clear the cached value -- or at least document the method by which one would clear the cache. Lets not formalise a half-complete API :-) And +1 -- I can't see any reason that this shouldn't be public API -- it's a common pattern. *Where* would be a good place to mention this? > > There doesn't seem to be a single place in the documents for "handy > decorators you might like". Perhaps there should be, with links to < > https://docs.djangoproject.com/en/dev/topics/http/decorators/> for > example. > > There's < > https://docs.djangoproject.com/en/1.5/ref/utils/#module-django.utils.functional> > of course, but no-one would actually find it there unless they were already > looking for it. > One suggestion -- a new special topic guide on performance tweaking, just like we have for security. We've already got this page: https://docs.djangoproject.com/en/dev/topics/db/optimization/ which is all about database optimisation -- this is a big part of optimising, but it's not the only story. A "performance" topic guide would give a chance to introduce value caching, template loading options (including cached templates), fast and slow session options, discussing how and when the database is hit, as well as little performance tweaks like the documented parts of utils.functional. Russ %-) -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
