Although I already figured out the abusing time_expire way by myself earlier, I still appreciate Achipa's hint for clear(), which I did not know. Thanks for that.
It seems I did not read enough docs. So, after taking another look at the epydoc (http://www.web2py.com/examples/static/epydoc/ web2py.gluon.cache.CacheInRam-class.html), I found that cache object has an increment() method too. Mmm, interesting for those who did not know that yet. PS: This discuss thread covers many useful points, such as: the cache scope is per app, the clear(), the gotcha. I am not sure whether and how all the info should be appear in some more popular doc like http://www.web2py.com/examples/default/examples#cache_examples On Mar27, 8:46am, AchipA <attila.cs...@gmail.com> wrote: > something along the lines of > > cache.ram.clear(regex='itemname') > > although you can abuse time_expire if just want to (p)regenerate stuff > in cache with > > cache.ram('item', lambda: 'new', 0) > > That will place/overwrite 'item' in the cache. cache.disk works the > same way. > > On Mar 26, 11:19 pm, Mark Larsen <larsen...@gmail.com> wrote: > > > Since we are on the subject, how can you remove an item from the cache? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---