nolimit

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package nolimit implements cache with simple nolimit algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoLimit

type NoLimit struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NoLimit is the base nolimit type.

func NewCache

func NewCache(storage storage.Storager) (*NoLimit, error)

NewCache returns new cache struct.

func (*NoLimit) Add

func (nl *NoLimit) Add(item entities.CacheItem) (bool, error)

Add adds item into cache.

func (*NoLimit) Clear added in v0.1.0

func (nl *NoLimit) Clear()

Clear clears all cache.

func (*NoLimit) Get

func (nl *NoLimit) Get(hash string) (entities.CacheItem, bool, error)

Get got item from cache.

Jump to

Keyboard shortcuts

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