persistentcache

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistentCache

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

func NewPersistentCache

func NewPersistentCache(pc PersistentCacheArgs) *PersistentCache

func (*PersistentCache) Delete

func (pc *PersistentCache) Delete(key string) error

Delete deletes one persistent cache entry.

func (*PersistentCache) Expire

func (pc *PersistentCache) Expire(keyPrefix string, olderThan time.Time) error

Expire expires old entries with the given key prefix.

func (*PersistentCache) Get

func (pc *PersistentCache) Get(key string) (string, error)

Get reads a persistet cache entry.

func (*PersistentCache) Upsert

func (pc *PersistentCache) Upsert(key string, value string, failOnDuplicate bool) error

Upsert creates or updates a persistent cache entry.

type PersistentCacheArgs

type PersistentCacheArgs struct {
	DB     *pgxpool.Pool
	Utils  *utils.Utils
	Cfg    *config.StorePostgresConfig
	Shared *shared.Shared
	UGen   *types.UidGenerator
}

Jump to

Keyboard shortcuts

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