alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

cache.ram.clear(regex) and making #164

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From grabau....@gmail.com on January 25, 2011 15:36:47

What steps will reproduce the problem? 1. Add object to cache using a non-string key value

  1. Call cache.ram.clear(regex), where regex is valid to re.compile and not None

Exception occurs, and the web server becomes totally irresponsive. In order to view the ticket must restart server and go into admin interface.

web2py version: 1.91.6 source, on MacOSX 1.6

I have taken the liberty of fixing in a clone https://grabaumac-cachefix.googlecode.com/hg/ The problem is occuring in CacheAbstract._cache at the line if re.match(key):

Original issue: http://code.google.com/p/web2py/issues/detail?id=166

alfonsodg commented 10 years ago

From grabau....@gmail.com on January 25, 2011 12:38:02

Bad title: can it be changed to "cache.ram.clear(regex) crash with non-str key in cache"

alfonsodg commented 10 years ago

From massimo....@gmail.com on January 26, 2011 20:55:07

Can you please post a patch?

alfonsodg commented 10 years ago

From grabau....@gmail.com on January 26, 2011 22:43:45

Sorry, my mistake to forget the patch - attached now. Prepared against copy of the trunk that I just checked out.

Attachment: cache.diff

alfonsodg commented 10 years ago

From massimo....@gmail.com on January 28, 2011 07:04:47

thanks your patch is in

Status: Fixed