repository

package
v0.0.0-...-9d6603c Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//NotFoundErrorTestItem not found error
	NotFoundErrorTestItem = cacheErrorTestItem("key not found")
	//NilValueErrorTestItem nil pointer given
	NilValueErrorTestItem = cacheErrorTestItem("value pointer shouldnt be nil")
	//CloseErrorTestItem cache is closed
	CloseErrorTestItem = cacheErrorTestItem("cache has been closed")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheTestItem

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

CacheTestItem typed cache

func NewNiceCacheTestItem

func NewNiceCacheTestItem() *CacheTestItem

NewNiceCacheTestItem typed cache constructor

func (*CacheTestItem) Close

func (c *CacheTestItem) Close()

Close cache

func (*CacheTestItem) Delete

func (c *CacheTestItem) Delete(key []byte) error

Delete value by key

func (*CacheTestItem) Flush

func (c *CacheTestItem) Flush() error

Flush cache. Can take a time

func (*CacheTestItem) Get

func (c *CacheTestItem) Get(key []byte, value *cachetype.TestItem) error

Get value by key

func (*CacheTestItem) Len

func (c *CacheTestItem) Len() int

Len get stored elements count

func (*CacheTestItem) Set

func (c *CacheTestItem) Set(key []byte, value *cachetype.TestItem, expireSeconds int) error

Set value by key

Jump to

Keyboard shortcuts

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