🎨 abstract cache method

This commit is contained in:
微凉
2021-12-08 22:58:44 +08:00
parent bb6e520ab5
commit b36eaf08f0
8 changed files with 18 additions and 19 deletions

View File

@ -119,7 +119,7 @@ func (driver AliDrive) GetFile(path string, account *model.Account) (*AliFile, e
if err != nil {
return nil, err
}
parentFiles_, _ := conf.Cache.Get(conf.Ctx, fmt.Sprintf("%s%s", account.Name, dir))
parentFiles_, _ := base.GetCache(dir, account)
parentFiles, _ := parentFiles_.([]AliFile)
for _, file := range parentFiles {
if file.Name == name {