`close` seems to imply "won't be accessible any more".  Why not `cache.flush` or `cache.sync`?  (this really applies to `PersistentDict` below)