I am caching full page HTML for certain parts of my application.

This is currently implemented by using the ext:database module from
beaker with a slightly modified custum decorator that replaces
beaker_cache from pylons. I am using mysql 5.0.32-Debian_7etch1-log

On certain pages (apparently with lots of HTML in it), I get:

File '<string>', line 1 in <lambda>
File '.../lib/decorators.py', line 62 in wrapper
  type=type, expiretime=expire,
File '.../Beaker-0.7.5-py2.4.egg/beaker/cache.py', line 51 in get
  return self._get_container(key, **kw).get_value()
File '.../Beaker-0.7.5-py2.4.egg/beaker/container.py', line 393 in
get_value
  [self.storedtime, value] = self.do_get_value()
File '.../Beaker-0.7.5-py2.4.egg/beaker/container.py', line 309 in
do_get_value
  return self.namespacemanager[self.key]
File '.../Beaker-0.7.5-py2.4.egg/beaker/ext/database.py', line 94 in
__getitem__
  return cPickle.loads(str(rows[0]['value']))
ValueError: insecure string pickle

On other pages caching works as expected.

When I look at the contents of the value column, the cache entries for
troublesome pages are cut off halfway though the HTML contents of the
response.

After lots of attempts at changing the the to be pickled contents, I
modified the columntype of value to be longtext instead of blob.

This solved all caching problems.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to