Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HitCache ¶
type HitCache interface {
HandleHit(string)
AddHit(string) error
Items() map[string]int
Clear()
OnCron()
}
HitCache is an interface for all cache backends
type HitGoCache ¶
type HitGoCache struct {
// contains filtered or unexported fields
}
HitGoCache implements the HitCache interface for go-cache
func (*HitGoCache) AddHit ¶
func (c *HitGoCache) AddHit(hit string) error
AddHit updates the cache with a URL value
func (*HitGoCache) HandleHit ¶
func (c *HitGoCache) HandleHit(hit string)
HandleHit manages error handling in AddHit and runs in the worker
func (*HitGoCache) Items ¶
func (c *HitGoCache) Items() map[string]int
Items returns a mapping of hits to integer counts
Click to show internal directories.
Click to hide internal directories.