Skip to content
Browse files

added a separate set of memcaches for the render cache

  • Loading branch information...
1 parent 8a27ada commit ae6ba7a78ed169277b6699ee0acb21024fb86b21 @spez spez committed Dec 16, 2008
Showing with 4 additions and 1 deletion.
  1. +1 −0 r2/example.ini
  2. +2 −0 r2/r2/lib/app_globals.py
  3. +1 −1 r2/r2/models/listing.py
View
1 r2/example.ini
@@ -14,6 +14,7 @@ log_path =
memcaches = 127.0.0.1:11211
permacaches = 127.0.0.1:11211
+rendercaches = 127.0.0.1:11211
rec_cache = 127.0.0.1:11311
tracker_url =
adtracker_url =
View
2 r2/r2/lib/app_globals.py
@@ -57,6 +57,7 @@ class Globals(object):
tuple_props = ['memcaches',
'rec_cache',
'permacaches',
+ 'rendercaches',
'admins',
'sponsors',
'monitored_servers',
@@ -112,6 +113,7 @@ def to_iter(name, delim = ','):
mc = Memcache(self.memcaches)
self.cache = CacheChain((LocalCache(), mc))
self.permacache = Memcache(self.permacaches)
+ self.rendercache = Memcache(self.rendercaches)
self.make_lock = make_lock_factory(mc)
self.rec_cache = Memcache(self.rec_cache)
View
2 r2/r2/models/listing.py
@@ -72,7 +72,7 @@ def render_items(names):
r[i] = item.render()
return r
- rendered_items = sgm(cache, fullnames, render_items, 'render_',
+ rendered_items = sgm(g.rendercache, fullnames, render_items, 'render_',
time = g.page_cache_time)
#replace the render function

0 comments on commit ae6ba7a

Please sign in to comment.
Something went wrong with that request. Please try again.