2023-06-15 21:22:51 +08:00
|
|
|
//
|
|
|
|
// cache_contact.go
|
|
|
|
// Copyright (C) 2022 tiglog <me@tiglog.com>
|
|
|
|
//
|
|
|
|
// Distributed under terms of the MIT license.
|
|
|
|
//
|
|
|
|
|
|
|
|
package gcache
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type ICacheAdapter interface {
|
2023-06-21 10:52:25 +08:00
|
|
|
Get(key string, dest interface{}) error
|
2023-06-15 21:22:51 +08:00
|
|
|
Set(key string, val interface{}, exp time.Duration) error
|
2023-06-21 10:52:25 +08:00
|
|
|
Del(keys ...string) (int64, error)
|
2023-06-15 21:22:51 +08:00
|
|
|
Has(key string) bool
|
|
|
|
}
|