[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-11 Thread Anthony
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-11 Thread Robin Manoli
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-11 Thread Leonel Câmara
Well it's regular python regexes so you can just look at Python 
documentation.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread Robin Manoli
Thanks Anthony!
Does it work the same to use cache.disk(...) ?

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread Leonel Câmara
Yes cache disk has the same behaviour.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-08 Thread Robin Manoli
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-06 Thread 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.