Documentation
¶
Overview ¶
Package sqlite is the Cache adapter backed by a sqlite file, normally $XDG_STATE_HOME/scrutiny/cache.db.
Index ¶
- type Cache
- func (c *Cache) AddCounts(ctx context.Context, buckets []metrics.Bucket) error
- func (c *Cache) Close() error
- func (c *Cache) CountsSince(ctx context.Context, since time.Time) ([]metrics.Bucket, error)
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) DeletePrefix(ctx context.Context, prefix string) error
- func (c *Cache) DeleteVisit(ctx context.Context, pr domain.PRRef) error
- func (c *Cache) Get(ctx context.Context, key string) (cache.Entry, bool, error)
- func (c *Cache) PruneCounts(ctx context.Context, before time.Time) error
- func (c *Cache) Put(ctx context.Context, key string, e cache.Entry) error
- func (c *Cache) RecentVisits(ctx context.Context, limit int) ([]cache.Visit, error)
- func (c *Cache) RecordVisit(ctx context.Context, v cache.Visit) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a sqlite-backed cache.Cache.
func (*Cache) CountsSince ¶
CountsSince returns the metric counts from since on, by name and minute.
func (*Cache) DeletePrefix ¶
DeletePrefix compares with substr rather than LIKE, so keys holding % or _ match literally.
func (*Cache) PruneCounts ¶
PruneCounts deletes metric counts from before before.
func (*Cache) RecentVisits ¶
Click to show internal directories.
Click to hide internal directories.