def sync
      if @cache.in_transaction?
        @cache.abort_transaction
        @cache.flush
        PEROBS.log.fatal "You cannot call sync() during a transaction: \n" +
          Kernel.caller.join("\n")
      end
      @cache.flush
    end
def sync
      if @cache.in_transaction?
        @cache.abort_transaction
        @cache.flush
        PEROBS.log.fatal "You cannot call sync() during a transaction: \n" +
          Kernel.caller.join("\n")
      end
      @cache.flush
    end
Flush out all modified objects to disk and shrink the in-memory list if
 needed.