Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv12603
Modified Files:
Cache.py SQLObject.py
Log Message:
Updated some places where the old cache system was still used
Index: Cache.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Cache.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Cache.py 14 Mar 2003 08:59:24 -0000 1.1
--- Cache.py 30 Mar 2003 01:47:35 -0000 1.2
***************
*** 123,126 ****
--- 123,132 ----
self.lock.release()
+ def purge(self, id):
+ if self.cache.has_key(id):
+ del self.cache[id]
+ if self.expiredCache.has_key(id):
+ del self.expiredCache[id]
+
class CacheSet(object):
Index: SQLObject.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** SQLObject.py 14 Mar 2003 08:59:24 -0000 1.9
--- SQLObject.py 30 Mar 2003 01:47:35 -0000 1.10
***************
*** 1,3 ****
! """
SQLObject.py
Ian Bicking <ia...@co...> 17 Oct 2002
--- 1,3 ----
! Scol"""
SQLObject.py
Ian Bicking <ia...@co...> 17 Oct 2002
***************
*** 292,303 ****
makeProperties(dict)
- # The instanceCache is a cache of already-created
- # instances. This way there's never more than one
- # of any instance. This needs to be a class attribute,
- # since the class shares its instances. And an
- # accompanying lock.
- dict['_SO_instanceCache'] = {}
- dict['_SO_instanceCacheLock'] = threading.Lock()
-
# If the connection is named, we turn the name into
# a real connection.
--- 292,295 ----
***************
*** 702,706 ****
WHERE %s = %s
""" % (self._table, self._idName, SQLBuilder.sqlRepr(self.id)))
! del self._SO_instanceCache[self.id]
def __repr__(self):
--- 694,698 ----
WHERE %s = %s
""" % (self._table, self._idName, SQLBuilder.sqlRepr(self.id)))
! self._connection.cache.purge(self.id)
def __repr__(self):
|