Documentation
¶
Index ¶
- type PgCache
- func (r *PgCache) CleanUp(ctx context.Context, interval int)
- func (r *PgCache) ClearCacheStore()
- func (r *PgCache) CreateCacheTable()
- func (r *PgCache) Delete(id string)
- func (r *PgCache) DeleteExpired()
- func (r *PgCache) DropCacheStore()
- func (r *PgCache) Get(id string) ([]byte, bool)
- func (r *PgCache) Init()
- func (r *PgCache) Put(id string, content []byte)
- func (r *PgCache) PutWitTTL(id string, content []byte, ttl int)
- func (r *PgCache) StartCleaner(interval int)
- func (r *PgCache) StopCleaner()
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) ClearCacheStore ¶
func (r *PgCache) ClearCacheStore()
func (*PgCache) CreateCacheTable ¶ added in v1.1.7
func (r *PgCache) CreateCacheTable()
func (*PgCache) DeleteExpired ¶
func (r *PgCache) DeleteExpired()
func (*PgCache) DropCacheStore ¶
func (r *PgCache) DropCacheStore()
func (*PgCache) StartCleaner ¶ added in v1.1.7
func (*PgCache) StopCleaner ¶ added in v1.1.7
func (r *PgCache) StopCleaner()
Click to show internal directories.
Click to hide internal directories.