Add a clear cache action

This commit is contained in:
Kovid Goyal 2025-11-23 12:15:29 +05:30
parent 37da04aad6
commit fae50137a9
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
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()