Show More
@@ -242,6 +242,10 class lrucachedict(object): | |||
|
242 | 242 | def __contains__(self, key): |
|
243 | 243 | return key in self._cache |
|
244 | 244 | |
|
245 | def clear(self): | |
|
246 | self._cache.clear() | |
|
247 | self._order = deque() | |
|
248 | ||
|
245 | 249 | def lrucachefunc(func): |
|
246 | 250 | '''cache most recent results of function calls''' |
|
247 | 251 | cache = {} |
General Comments 0
You need to be logged in to leave comments.
Login now