Mihai Ilinca wrote at 2006-1-30 20:11 +0200: > ... >I want to have a ClientStorage that would work in both connected and >disconnected (to zeo-server) mode. When zeo-server is not up (or reachable), >I would like ClientStorage to use a local cache. Is that possible with ZEO? > >Right now I instanciate ClientStorage with >ClientStorage( > zeoServerAddress, > name = 'name', > client = 'client', > var = 'path', > wait = False > ) >When I try to access the attributes of the root persistent object (instance of >PersistentMapping) I get a ClientDisconnected exception:
In principle, it should be possible (though I did not try it myself). Of course, as soon as you modify any object or have a cache miss on reading, the ZEO server will be contacted and you get a "ClientDisconnect" when this is impossible. "ClientStorage" does not support complete autonomous work (purly with a cache). All writes need to go directly to ZEO. -- Dieter _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev