cache

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncCache

type SyncCache struct {
	// contains filtered or unexported fields
}

func NewSyncCache

func NewSyncCache(c cache.Cache) *SyncCache

func NewSyncCacheDefault

func NewSyncCacheDefault(cacheBytes int64) *SyncCache

func (*SyncCache) Add

func (s *SyncCache) Add(key string, value cache.Valuer)

Add 新建数据

func (*SyncCache) Clear

func (s *SyncCache) Clear()

func (*SyncCache) Get

func (s *SyncCache) Get(key string) (value cache.Valuer, ok bool)

func (*SyncCache) Len

func (s *SyncCache) Len() int

Len 缓存列表的条数

func (*SyncCache) Remove

func (s *SyncCache) Remove(key string)

移除指定key的数据

Directories

Path Synopsis
backend

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL