cache

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteExpired

func DeleteExpired(db *gorm.DB) error

func Lookup

func Lookup[I any, K any](db *gorm.DB, key K, fallback func() I) I

Types

type Cache

type Cache struct {
	ID        uint      `gorm:"primaryKey" json:"id"`
	ExpiresAt time.Time `json:"expires_at"`
	HashKey   string    `json:"hash_key"`
	Value     []byte    `gorm:"type:BLOB" json:"item"`
}

Jump to

Keyboard shortcuts

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