Documentation ¶
Index ¶
Constants ¶
View Source
const ( FILE_CACHER_PATH string = "./runtime/cache/" FILE_CACHER_EXT string = "" )
View Source
const (
MEMORY_GC_Time = time.Duration(10) * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacherType ¶
type CacherType string
const ( TypeFile CacherType = "file" TypeMemory CacherType = "memory" TypeRedis CacherType = "redis" TypeMemcache CacherType = "memcache" )
type FileCacher ¶
File Adapter
func NewFileCacher ¶
func NewFileCacher(path string) *FileCacher
func (*FileCacher) Clear ¶
func (fc *FileCacher) Clear() error
func (*FileCacher) Get ¶
func (fc *FileCacher) Get(key string) interface{}
func (*FileCacher) Pull ¶
func (fc *FileCacher) Pull(key string) interface{}
func (*FileCacher) Remove ¶
func (fc *FileCacher) Remove(key string) error
type MemcacheCacher ¶
type MemcacheCacher struct {
// contains filtered or unexported fields
}
func NewMemcacheCacher ¶
func NewMemcacheCacher(server ...string) *MemcacheCacher
type MemoryCacher ¶
Memory Adapter
func DefaultMemoryCacher ¶
func DefaultMemoryCacher() *MemoryCacher
func NewMemoryCacher ¶
func NewMemoryCacher(gcTime time.Duration) *MemoryCacher
func (*MemoryCacher) Clear ¶
func (mc *MemoryCacher) Clear() error
func (*MemoryCacher) Pull ¶
func (mc *MemoryCacher) Pull(key string) interface{}
func (*MemoryCacher) Remove ¶
func (mc *MemoryCacher) Remove(key string) error
Click to show internal directories.
Click to hide internal directories.