Re-enable caching for content view calculation.

This commit is contained in:
Aldo Cortesi 2012-03-25 11:18:33 +13:00
parent 2240d2a6a5
commit a979e1ad50

View File

@ -90,8 +90,13 @@ class FlowViewHeader(common.WWrap):
class CallbackCache:
@utils.LRUCache(100)
def _callback(self, method, *args, **kwargs):
return getattr(self.obj, method)(*args, **kwargs)
def callback(self, obj, method, *args, **kwargs):
return getattr(obj, method)(*args, **kwargs)
# obj varies!
self.obj = obj
return self._callback(method, *args, **kwargs)
cache = CallbackCache()