Add a clear cache action

This commit is contained in:
Kovid Goyal
2025-11-23 12:15:29 +05:30
parent 37da04aad6
commit fae50137a9
4 changed files with 49 additions and 2 deletions

View File

@@ -66,6 +66,12 @@ func (dc *DiskCache) Remove(key string) (err error) {
return dc.remove(key)
}
func (dc *DiskCache) Clear() (err error) {
dc.lock()
defer dc.unlock()
return dc.clear()
}
func (dc *DiskCache) AddPath(path, key string, items map[string][]byte) (ans map[string]string, err error) {
dc.lock()
defer dc.unlock()