summaryrefslogtreecommitdiff
path: root/repoze/lru/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'repoze/lru/__init__.py')
-rw-r--r--repoze/lru/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/repoze/lru/__init__.py b/repoze/lru/__init__.py
index 8ac2415..8e48859 100644
--- a/repoze/lru/__init__.py
+++ b/repoze/lru/__init__.py
@@ -5,16 +5,13 @@ import threading
import time
import uuid
-try:
- range = xrange
-except NameError: # pragma: no cover
- pass
_MARKER = object()
# By default, expire items after 2**60 seconds. This fits into 64 bit
# integers and is close enough to "never" for practical purposes.
_DEFAULT_TIMEOUT = 2 ** 60
+
class LRUCache(object):
""" Implements a pseudo-LRU algorithm (CLOCK)
@@ -266,6 +263,7 @@ class ExpiringLRUCache(object):
self.clock_refs[entry[0]] = False
# else: key was not in cache. Nothing to do.
+
class lru_cache(object):
""" Decorator for LRU-cached function