Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_CACHE_SIZE_MB = 10
Do not store over this amount of MBs in the cache
Variables ¶
This section is empty.
Functions ¶
func NewCustomError ¶
Types ¶
type Cache ¶
type CacheValidator ¶
type CacheValidator interface {
IsValid(cache *EndpointCache) bool
}
type TimeValidator ¶
type TimeValidator struct{}
func (*TimeValidator) IsValid ¶
func (v *TimeValidator) IsValid(cache *EndpointCache) bool
type TimedCache ¶
type TimedCache struct { CacheMap shardedmap.ShardMap CacheTimeout time.Duration EstimatedSize atomic.Uint64 // in bytes Validator CacheValidator }
func (*TimedCache) Get ¶
func (cache *TimedCache) Get(name string) (EndpointCache, error)
func (*TimedCache) Size ¶
func (cache *TimedCache) Size() uint64
Source Files ¶
Click to show internal directories.
Click to hide internal directories.