mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Re-enable caching for content view calculation.
This commit is contained in:
parent
2240d2a6a5
commit
a979e1ad50
@ -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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user