summaryrefslogtreecommitdiff
path: root/pylru.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylru.py')
-rw-r--r--pylru.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pylru.py b/pylru.py
index 0a9bf11..1b5bb88 100644
--- a/pylru.py
+++ b/pylru.py
@@ -370,6 +370,10 @@ class WriteBackCacheManager(object):
def size(self, size=None):
return self.cache.size(size)
+ def len(self):
+ self.sync()
+ return len(self.store)
+
def clear(self):
self.cache.clear()
self.dirty.clear()