cache

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheService

type CacheService interface {
	SetWithoutExpiry(key string, value interface{})
	Set(key string, value interface{}, expiry time.Duration)
	Get(key string) (interface{}, bool)
	Delete(key string)
}

type InMemCacheService

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

func NewInMemCacheService

func NewInMemCacheService(expiry time.Duration, clearExpiredCacheInterval time.Duration) *InMemCacheService

func (*InMemCacheService) Delete

func (c *InMemCacheService) Delete(key string)

func (*InMemCacheService) Get

func (c *InMemCacheService) Get(key string) (interface{}, bool)

func (*InMemCacheService) Set added in v1.11.0

func (c *InMemCacheService) Set(key string, value interface{}, expiry time.Duration)

func (*InMemCacheService) SetWithoutExpiry

func (c *InMemCacheService) SetWithoutExpiry(key string, value interface{})

Jump to

Keyboard shortcuts

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