shelve: writing out updates?!

Paul Rubin http
Sat Jul 30 20:48:39 EDT 2005


Shelve uses dbm and pickle to make a persistent object store.  The
"db" in "dbm" stands for "database" and while I didn't expect full
ACID capability, I'd have thought there'd be at least some minimum
gesture towards durability of updates.  But say that s is a shelve
object.  If I say

   s[whatever] = value

there is no way apparent from the shelve docs to get the update
flushed out to the disk file until the shelve is actually closed.  If
I'm using the shelve to store stuff in a long-running server, it could
be months before the shelve closes.

Is shelve really missing this capability?  

Thanks.



More information about the Python-list mailing list