2020-07-27 17:01:02 +00:00
|
|
|
package diskcache
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type NoOp struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewNoOp() *NoOp {
|
|
|
|
return &NoOp{}
|
|
|
|
}
|
|
|
|
|
2024-04-01 16:24:06 +00:00
|
|
|
func (n *NoOp) Store(_ context.Context, _ string, _ []byte) error {
|
2020-07-27 17:01:02 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2024-04-01 16:24:06 +00:00
|
|
|
func (n *NoOp) Load(_ context.Context, _ string) (value []byte, exist bool, err error) {
|
2020-07-27 17:01:02 +00:00
|
|
|
return nil, false, nil
|
|
|
|
}
|
|
|
|
|
2024-04-01 16:24:06 +00:00
|
|
|
func (n *NoOp) Delete(_ context.Context, _ string) error {
|
2020-07-27 17:01:02 +00:00
|
|
|
return nil
|
|
|
|
}
|