def get(self, key, default=None):
        """
        Retreive a value from the cache. In the event the value
        does not exist, return the ``default``.
        """
        key = self.make_key(key)

        if self.debug:
            return default

        try:
            value = self.database[key]
        except KeyError:
            self.metrics['misses'] += 1
            return default
        else:
            self.metrics['hits'] += 1
            return pickle.loads(value)
def get ( self , key , default = None ) : key = self . make_key ( key ) if self . debug : return default try : value = self . database [ key ] except KeyError : self . metrics [ 'misses' ] += 1 return default else : self . metrics [ 'hits' ] += 1 return pickle . loads ( value )
Retreive a value from the cache. In the event the value
        does not exist, return the ``default``.