On 2010-12-11 16:10, Massimiliano Torromeo wrote:
I am already using the pyramid_beaker session factory, but there
doesn't seem to exist a beaker cache factory (or a valid alternative).
No factory is needed. Here is my recipe:
from beaker.util import parse_cache_config_options
import beaker.cache
settings=config.registry.settings
cfg=parse_cache_config_options(settings)
beaker.cache.cache_regions.update(cfg["cache_regions"])
after putting that in your startup code in run.py you can use the beaker
cache_regions decorator for normal caching.
Wichert.
--
Wichert Akkerman <wich...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
--
You received this message because you are subscribed to the Google Groups
"pylons-devel" group.
To post to this group, send email to pylons-de...@googlegroups.com.
To unsubscribe from this group, send email to
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-devel?hl=en.