Cache delete items
I can now delete things from the cache in addition to adding things.
This commit is contained in:
parent
fed3c7f356
commit
70a2759192
|
@ -35,6 +35,11 @@ class CacheObject:
|
|||
else:
|
||||
return path
|
||||
|
||||
def delete(self, key):
|
||||
path = join(self.path, key)
|
||||
if exists(path):
|
||||
rm(path)
|
||||
|
||||
class Cache:
|
||||
def keys(self):
|
||||
return ls(CACHE_DIR)
|
||||
|
|
Loading…
Reference in New Issue