1
0
mirror of https://github.com/rancher/os.git synced 2025-09-06 01:01:43 +00:00

Support service cache update

This commit is contained in:
Jason-ZW
2019-02-25 17:48:31 +08:00
committed by niusmallnan
parent 364c9c115d
commit 66cffc0a91
6 changed files with 108 additions and 18 deletions

View File

@@ -43,3 +43,8 @@ func cacheAdd(location string, data []byte) {
cacheFile := cacheDirectory + locationHash(location)
os.Rename(tempFile.Name(), cacheFile)
}
func cacheRemove(location string) error {
cacheFile := cacheDirectory + locationHash(location)
return os.Remove(cacheFile)
}