pgcache

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgCache

type PgCache struct {
	DbPool *sql.DB `required:"true"`
	TTL    int

	CacheTable      string `required:"true"`
	CleanerInterval int    `default:"60"` // in seconds
	// contains filtered or unexported fields
}

func (*PgCache) CleanUp

func (r *PgCache) CleanUp(ctx context.Context, interval int)

func (*PgCache) ClearCacheStore

func (r *PgCache) ClearCacheStore()

func (*PgCache) CreateCacheTable added in v1.1.7

func (r *PgCache) CreateCacheTable()

func (*PgCache) Delete

func (r *PgCache) Delete(id string)

func (*PgCache) DeleteExpired

func (r *PgCache) DeleteExpired()

func (*PgCache) DropCacheStore

func (r *PgCache) DropCacheStore()

func (*PgCache) Get

func (r *PgCache) Get(id string) ([]byte, bool)

func (*PgCache) Init

func (r *PgCache) Init()

func (*PgCache) Put

func (r *PgCache) Put(id string, content []byte)

func (*PgCache) PutWitTTL

func (r *PgCache) PutWitTTL(id string, content []byte, ttl int)

func (*PgCache) StartCleaner added in v1.1.7

func (r *PgCache) StartCleaner(interval int)

func (*PgCache) StopCleaner added in v1.1.7

func (r *PgCache) StopCleaner()

Jump to

Keyboard shortcuts

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