The key is the key you used to store the cached value (i.e., the first argument you pass to cache.ram, etc.). The regex is a standard Python regular expression that matches one or more keys.
On Sunday, January 11, 2015 at 6:09:00 PM UTC-5, Robin Manoli wrote: > > Is there some documentation or examples for what values to use as key or > regex? > > Den fredag 9 januari 2015 kl. 14:02:42 UTC+1 skrev Anthony: >> >> To clear a single item, you can use cache.ram(key, None), and to clear >> multiple items, you can use cache.ram.clear(regex='[some regex]'). To clear >> the entire cache, cache.ram.clear(None). >> >> Anthony >> >> On Friday, January 9, 2015 at 2:47:39 AM UTC-5, Robin Manoli wrote: >>> >>> Ok, thank you Derek. >>> >>> Is there any way to remove old cache from mem and disk then, that is no >>> longer in use? >>> >>> Den tisdag 6 januari 2015 kl. 19:42:58 UTC+1 skrev Derek: >>>> >>>> No, there's nothing going on in the background unless something is >>>> processing. It will check as soon as a new request comes in that >>>> references >>>> the cache, it will review the expiration date of the cached item before >>>> using it. >>>> >>>> On Monday, January 5, 2015 6:27:29 PM UTC-7, Robin Manoli wrote: >>>>> >>>>> Hi! >>>>> >>>>> When caching selects, in memory or disk, are they then cleared >>>>> automatically when the expiration time is over? Removed and forgotten? >>>>> Or is there some cleanup script similar to the one for sessions? >>>>> >>>>> - Robin >>>>> >>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

