memoryCache

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDriver

type CacheDriver struct {
	Cache *xsync.Map
}

func GetMemoryCacheDriver

func GetMemoryCacheDriver(cfg *models.Config) (*CacheDriver, error)

func (*CacheDriver) Expire

func (b *CacheDriver) Expire(ctx context.Context, id string) error

func (*CacheDriver) Get

func (b *CacheDriver) Get(ctx context.Context, id string) (interface{}, error)

func (*CacheDriver) GetAppCache

func (b *CacheDriver) GetAppCache(ctx context.Context, projectId string) (*models.ApplicationCache, error)

func (*CacheDriver) GetProject

func (b *CacheDriver) GetProject(ctx context.Context, projectId string) (*models.Project, error)

func (*CacheDriver) ListKeys

func (b *CacheDriver) ListKeys(ctx context.Context) ([]string, error)

func (*CacheDriver) Put

func (b *CacheDriver) Put(ctx context.Context, id string, cache interface{}) error

func (*CacheDriver) PutAppCache

func (b *CacheDriver) PutAppCache(ctx context.Context, projectId string, cache *models.ApplicationCache) error

func (*CacheDriver) SaveProject

func (b *CacheDriver) SaveProject(ctx context.Context, project *models.Project) (*models.Project, error)

Jump to

Keyboard shortcuts

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