mirror of
https://github.com/weloe/token-go.git
synced 2025-10-14 11:43:45 +08:00
16 lines
408 B
Go
16 lines
408 B
Go
package cache
|
|
|
|
type Cache interface {
|
|
Get(key string) interface{}
|
|
// Set store interface{}
|
|
Set(key string, value interface{}, timeout int64) error
|
|
// Update update value
|
|
Update(key string, value interface{}) error
|
|
// Delete delete value
|
|
Delete(key string) error
|
|
// GetTimeout get expire
|
|
GetTimeout(key string) int64
|
|
// UpdateTimeout update timeout
|
|
UpdateTimeout(key string, timeout int64) error
|
|
}
|