golib/gcache/cache_contract.go

19 lines
334 B
Go
Raw Normal View History

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 {
Get(key string) (string, error)
Set(key string, val interface{}, exp time.Duration) error
Del(keys ...string) int64
Has(key string) bool
End()
}