mirror of
https://github.com/rclone/rclone.git
synced 2025-12-12 06:24:14 +01:00
fs/cache: add ClearConfig method to clear all remotes based on Config #4811
This commit is contained in:
7
fs/cache/cache.go
vendored
7
fs/cache/cache.go
vendored
@@ -124,6 +124,13 @@ func Put(fsString string, f fs.Fs) {
|
||||
addMapping(fsString, canonicalName)
|
||||
}
|
||||
|
||||
// ClearConfig deletes all entries which were based on the config name passed in
|
||||
//
|
||||
// Returns number of entries deleted
|
||||
func ClearConfig(name string) (deleted int) {
|
||||
return c.DeletePrefix(name + ":")
|
||||
}
|
||||
|
||||
// Clear removes everything from the cache
|
||||
func Clear() {
|
||||
c.Clear()
|
||||
|
||||
Reference in New Issue
Block a user