def determine_save_path(self, path=None, dir=None, filename=None): if path is None and dir is None: raise RuntimeError('path or directory must be specified') if not path: filename = normalize_filename(filename or self.default_filename) path = absjoin(dir, filename) return path
def get_path(self, cache_id): return utils.absjoin(self.cache_dir, utils.normalize_filename(cache_id))