Documentation ¶
Overview ¶
This package implements an image DB cache using memcached.
Items are given an expiry based on their refresh deadline, with a minimum duration to try and ensure things will expire well after they would have been refreshed (i.e., only if they truly need garbage collection).
memcached will still evict things when under memory pressure. We can recover from that -- we'll just get a cache miss, and fetch it again.
Index ¶
Constants ¶
View Source
const ( // The minimum expiry given to an entry. MinExpiry = time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemcacheClient ¶
type MemcacheClient struct {
// contains filtered or unexported fields
}
MemcacheClient is a memcache client that gets its server list from SRV records, and periodically updates that ServerList.
func NewFixedServerMemcacheClient ¶
func NewFixedServerMemcacheClient(config MemcacheConfig, addresses ...string) *MemcacheClient
Does not use DNS, accepts static list of servers.
func NewMemcacheClient ¶
func NewMemcacheClient(config MemcacheConfig) *MemcacheClient
Click to show internal directories.
Click to hide internal directories.