Clear local cache by deleting all cached resources and their
        downloaded files.

def cache_clear(self):
        """Clear local cache by deleting all cached resources and their
        downloaded files.
        """
        # Delete content of local cache directory
        for f in os.listdir(self.directory):
            f = os.path.join(self.directory, f)
            if os.path.isfile(f):
                os.remove(f)
            elif os.path.isdir(f):
                shutil.rmtree(f)
        # Empty cache index
        self.cache = {}