On Wednesday, April 23, 2014 3:15:25 PM UTC-7, Volker Braun wrote:
>
> Also, I think that caches should age out eventually. This would also 
> mitigate a lot of possible memleaks. Downside is of course that you might 
> have to recompute intermediate results, but that is still better than being 
> reaped by the OOM killer ;-)
>
 
I disagree that this would be desirable default behaviour: the aging of the 
cache would introduce yet another dependency on history in computations and 
hence make buggy behaviour harder to reproduce. Furthermore, there can also 
be semantic reasons why you want a certain result to be computed only once 
and then cached for the rest of the lifetime (lazily computed attributes 
are presently often implemented via cached methods, because for a while 
that seemed faster).

It's of course perfectly fine to have a "limited_cached" decorator that 
implements some ageing strategy if people see a need for it, but we 
shouldn't just supplant cached_method etc. with it.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to