This repository has been archived on 2026-01-01. You can view files and clone it, but cannot push or open issues or pull requests.
filebrowser-fork/diskcache/noop_cache.go
2020-07-27 19:26:45 +02:00

25 lines
394 B
Go

package diskcache
import (
"context"
)
type NoOp struct {
}
func NewNoOp() *NoOp {
return &NoOp{}
}
func (n *NoOp) Store(ctx context.Context, key string, value []byte) error {
return nil
}
func (n *NoOp) Load(ctx context.Context, key string) (value []byte, exist bool, err error) {
return nil, false, nil
}
func (n *NoOp) Delete(ctx context.Context, key string) error {
return nil
}