def delete ( self , name ) : if name in self . _cache : del self . _cache [ name ] self . writeCache ( ) # TODO clean files return True return False
delete a cache automatically python
Deletes the named entry in the cache . : param name : the name . : return : true if it is deleted .
def delete(self, name):
        """
        Deletes the named entry in the cache.
        :param name: the name.
        :return: true if it is deleted.
        """
        if name in self._cache:
            del self._cache[name]
            self.writeCache()
            # TODO clean files
            return True
        return False