(_ context.Context, key string)
| 63 | } |
| 64 | |
| 65 | func (f *FileCache) Delete(_ context.Context, key string) error { |
| 66 | mu := f.getScopedLocks(key) |
| 67 | mu.Lock() |
| 68 | defer mu.Unlock() |
| 69 | |
| 70 | fileName := f.getFileName(key) |
| 71 | if err := f.fs.Remove(fileName); err != nil && !errors.Is(err, os.ErrNotExist) { |
| 72 | return err |
| 73 | } |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | func (f *FileCache) open(key string) (afero.File, bool, error) { |
| 78 | fileName := f.getFileName(key) |
nothing calls this directly
no test coverage detected