MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / clear

Method clear

utils/cache.py:81–87  ·  view source on GitHub ↗

Deletes all cache files from disk. Calls init() again.

(self)

Source from the content-addressed store, hash-verified

79
80
81 def clear(self):
82 '''Deletes all cache files from disk. Calls init() again.'''
83 self.con.close()
84 os.remove(self.metadata_db)
85 for bin_path in self.path.glob('*.bin'):
86 os.remove(bin_path)
87 self.init()
88
89
90 def create_new_shard(self):

Callers 2

initMethod · 0.95
_map_and_cacheFunction · 0.95

Calls 1

initMethod · 0.95

Tested by

no test coverage detected