[Zope-CVS] CVS: Products/AdaptableStorage - Zope2FS.py:1.19 Zope2SQL.py:1.12

Shane Hathaway shane@zope.com
Thu, 6 Feb 2003 14:09:22 -0500


Update of /cvs-repository/Products/AdaptableStorage
In directory cvs.zope.org:/tmp/cvs-serv3319

Modified Files:
	Zope2FS.py Zope2SQL.py 
Log Message:
Removed the volatile object mapper feature.  Setting the cache_size to 0
is simpler and faster, and although volatile mappers provide more
fine-grained control over caching, they don't seem to be needed for now.

To bring the feature back, do this:

cvs up -j without-volatile-mappers -j with-volatile-mappers



=== Products/AdaptableStorage/Zope2FS.py 1.18 => 1.19 ===
--- Products/AdaptableStorage/Zope2FS.py:1.18	Mon Feb  3 13:26:47 2003
+++ Products/AdaptableStorage/Zope2FS.py	Thu Feb  6 14:08:50 2003
@@ -32,9 +32,9 @@
     Usage in database configuration file:
     factory=Products.AdaptableStorage.Zope2FS.createMapper
     """
+    # The "volatile" argument is ignored.
     conn = FSConnection(basepath, **kw)
     root_mapper = createZope2Mapper('/', 0)
-    root_mapper.setVolatile(int(volatile))
     root_mapper.getClassifier().setGateway(FSClassificationSection(conn))
     root_mapper.setKeychainGenerator(PathKeychainGenerator())
 


=== Products/AdaptableStorage/Zope2SQL.py 1.11 => 1.12 ===
--- Products/AdaptableStorage/Zope2SQL.py:1.11	Mon Feb  3 13:26:47 2003
+++ Products/AdaptableStorage/Zope2SQL.py	Thu Feb  6 14:08:50 2003
@@ -25,11 +25,10 @@
 from Zope2Mapper import createZope2Mapper
 
 
-def createSQLMapper(conn, volatile=1):
+def createSQLMapper(conn):
     """Object mapper factory, with extra return arg for testing purposes
     """
     root_mapper = createZope2Mapper(0, 1)
-    root_mapper.setVolatile(int(volatile))
     root_mapper.getClassifier().setGateway(SQLClassification(conn))
     root_mapper.setKeychainGenerator(SQLKeychainGenerator(conn))
 
@@ -146,7 +145,8 @@
     Usage in database configuration file:
     factory=Products.AdaptableStorage.Zope2SQL.createMapper
     """
+    # The "volatile" argument is ignored.
     from gateway_sql.public import PsycopgConnection
     conn = PsycopgConnection(params, table_prefix)
-    return createSQLMapper(conn, volatile)[:2]
+    return createSQLMapper(conn)[:2]