(self, key)
Implementation of :meth:`~simplekv.KeyValueStore.open`.

        If a cache miss occurs, the value is retrieved, stored in the cache,
        then then another open is issued on the cache.

        If the cache raises an :exc:`~exceptions.IOError`, the cache is
        ignored, and the backing store is consulted directly.

        It is possible for a caching error to occur while attempting to store
        the value in the cache. It will not be handled as well.
Implementation of :meth:`~simplekv.KeyValueStore.open`.
Implementation of : meth : ~simplekv . KeyValueStore . open .
def open(self, key):
        """Implementation of :meth:`~simplekv.KeyValueStore.open`.

        If a cache miss occurs, the value is retrieved, stored in the cache,
        then then another open is issued on the cache.

        If the cache raises an :exc:`~exceptions.IOError`, the cache is
        ignored, and the backing store is consulted directly.

        It is possible for a caching error to occur while attempting to store
        the value in the cache. It will not be handled as well.
        """
        try:
            return self.cache.open(key)
        except KeyError:
            # cache miss, load into cache
            fp = self._dstore.open(key)
            self.cache.put_file(key, fp)

            return self.cache.open(key)
        except IOError:
            # cache error, ignore completely and return from backend
            return self._dstore.open(key)
def open ( self , key ) : try : return self . cache . open ( key ) except KeyError : # cache miss, load into cache fp = self . _dstore . open ( key ) self . cache . put_file ( key , fp ) return self . cache . open ( key ) except IOError : # cache error, ignore completely and return from backend return self . _dstore . open ( key )