Specifying memcached as beaker.cache.type?

11 views
Skip to first unread message

Jack

unread,
May 27, 2009, 10:59:00 PM5/27/09
to pylons-discuss
You can specify different beaker.session.type (database, memcached,
etc.), and when you do "from pylons import session" you'll use the
proper session type.

Is it possible to do the same for "beaker.cache.type"?

I'm using the cache through "from pylons import cache", and then
cache.get_cache('namespace').

I tried setting the type to memcached, but don't see anything being
populated in memcache.

I must be doing something wrong?

Ben Bangert

unread,
May 30, 2009, 3:39:13 PM5/30/09
to pylons-...@googlegroups.com

Keep in mind you'll need to include as an option, the memcached url.
I'd suggest reading:
http://beaker.groovie.org/configuration.html#options-for-sessions-and-caching

Which shows how to configure Beaker for memcached. Also, if you are
frequently using the same set of options:
http://beaker.groovie.org/configuration.html#cache-region-options

And rather than using cache.get_cache, I'd suggest:
http://beaker.groovie.org/caching.html#cache-regions

Cheers,
Ben

Reply all
Reply to author
Forward
0 new messages