summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pylru.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pylru.py b/pylru.py
index fd44f97..3f8d8ec 100644
--- a/pylru.py
+++ b/pylru.py
@@ -158,6 +158,11 @@ class lrucache(object):
# need to adjust the 'head' variable.
self.head = node
+ def update(self, items):
+
+ # Add multiple items to the cache.
+ for n, v in items.items():
+ self[n] = v
def __delitem__(self, key):