golib/gcache/cache_contract.go

18 lines
344 B
Go

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