15 lines
295 B
Go
15 lines
295 B
Go
package cache
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ICacher interface {
|
|
FlushKeys(prefix string) error
|
|
Set(key string, value interface{}, expiration time.Duration) error
|
|
Del(key string) error
|
|
Get(key string) interface{}
|
|
GetAs(key string, ptr interface{}) error
|
|
Keys(prefix string) ([]string, error)
|
|
}
|