Thread: [SQL-CVS] SQLObject/SQLObject Cache.py,1.6,1.7
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <ian...@us...> - 2003-05-05 20:42:12
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject In directory sc8-pr-cvs1:/tmp/cvs-serv14782/SQLObject Modified Files: Cache.py Log Message: Added clear method to CacheSet too... Index: Cache.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Cache.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Cache.py 5 May 2003 20:40:37 -0000 1.6 --- Cache.py 5 May 2003 20:42:08 -0000 1.7 *************** *** 174,175 **** --- 174,183 ---- except KeyError: pass + + def clear(self, cls=None): + if cls is None: + for cache in self.caches.values(): + cache.clear() + elif self.caches.has_key(cls.__name__): + self.caches[cls.__name__].clear() + |