summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 824eb84)
raw | patch | inline | side by side (parent: 824eb84)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 23 Sep 2002 07:15:32 +0000 (07:15 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 23 Sep 2002 07:15:32 +0000 (07:15 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1209 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/rdbms_common.py | patch | blob | history |
index 29f0ca7ac01f835eb35adb44e12fd8ed13d0ebe5..f3d6821b83e6b01afcd20a1e41e7f6362e66d05d 100644 (file)
-# $Id: rdbms_common.py,v 1.11 2002-09-23 06:48:35 richard Exp $
+# $Id: rdbms_common.py,v 1.12 2002-09-23 07:15:32 richard Exp $
# standard python modules
import sys, os, time, re, errno, weakref, copy
if self.cache.has_key(key):
# push us back to the top of the LRU
self.cache_lru.remove(key)
- self.cache_lry.insert(0, key)
+ self.cache_lru.insert(0, key)
# return the cached information
return self.cache[key]
self.cache[key] = node
# update the LRU
self.cache_lru.insert(0, key)
- del self.cache[self.cache_lru.pop()]
+ if len(self.cache_lru) > ROW_CACHE_SIZE:
+ del self.cache[self.cache_lru.pop()]
return node