Remove deletes a file from the backend and the cache if it has been cached.
(ctx context.Context, h backend.Handle)
| 37 | |
| 38 | // Remove deletes a file from the backend and the cache if it has been cached. |
| 39 | func (b *Backend) Remove(ctx context.Context, h backend.Handle) error { |
| 40 | debug.Log("cache Remove(%v)", h) |
| 41 | err := b.Backend.Remove(ctx, h) |
| 42 | if err != nil { |
| 43 | return err |
| 44 | } |
| 45 | |
| 46 | _, err = b.Cache.remove(h) |
| 47 | return err |
| 48 | } |
| 49 | |
| 50 | func autoCacheTypes(h backend.Handle) bool { |
| 51 | switch h.Type { |
nothing calls this directly
no test coverage detected