Versions in this module Expand all Collapse all v0 v0.26.0 Apr 9, 2022 Changes in this version + var DefaultGroupcacheConfig = GroupcacheConfig + var DefaultInMemoryCacheConfig = InMemoryCacheConfig + func RegisterCacheStatsCollector(galaxy *galaxycache.Galaxy, reg prometheus.Registerer) + type AttributesConfig struct + TTL time.Duration + type Cache interface + Fetch func(ctx context.Context, keys []string) map[string][]byte + Name func() string + Store func(ctx context.Context, data map[string][]byte, ttl time.Duration) + func NewTracingCache(cache Cache) Cache + type CacheStatsCollector struct + func (s *CacheStatsCollector) Collect(ch chan<- prometheus.Metric) + func (s *CacheStatsCollector) Describe(ch chan<- *prometheus.Desc) + type CachingBucketConfig struct + func NewCachingBucketConfig() *CachingBucketConfig + func (cfg *CachingBucketConfig) AllConfigNames() map[string][]string + func (cfg *CachingBucketConfig) CacheAttributes(configName string, cache Cache, matcher func(name string) bool, ...) + func (cfg *CachingBucketConfig) CacheExists(configName string, cache Cache, matcher func(string) bool, ...) + func (cfg *CachingBucketConfig) CacheGet(configName string, cache Cache, matcher func(string) bool, ...) + func (cfg *CachingBucketConfig) CacheGetRange(configName string, cache Cache, matcher func(string) bool, subrangeSize int64, ...) + func (cfg *CachingBucketConfig) CacheIter(configName string, cache Cache, matcher func(string) bool, ttl time.Duration, ...) + func (cfg *CachingBucketConfig) FindAttributesConfig(name string) (string, *AttributesConfig) + func (cfg *CachingBucketConfig) FindExistConfig(name string) (string, *ExistsConfig) + func (cfg *CachingBucketConfig) FindGetConfig(name string) (string, *GetConfig) + func (cfg *CachingBucketConfig) FindGetRangeConfig(name string) (string, *GetRangeConfig) + func (cfg *CachingBucketConfig) FindIterConfig(dir string) (string, *IterConfig) + func (cfg *CachingBucketConfig) SetCacheImplementation(c Cache) + type ExistsConfig struct + DoesntExistTTL time.Duration + ExistsTTL time.Duration + type GetConfig struct + ContentTTL time.Duration + MaxCacheableSize int + type GetRangeConfig struct + AttributesTTL time.Duration + MaxSubRequests int + SubrangeSize int64 + SubrangeTTL time.Duration + type Groupcache struct + func NewGroupcache(logger log.Logger, reg prometheus.Registerer, conf []byte, basepath string, ...) (*Groupcache, error) + func NewGroupcacheWithConfig(logger log.Logger, reg prometheus.Registerer, conf GroupcacheConfig, ...) (*Groupcache, error) + func (c *Groupcache) Fetch(ctx context.Context, keys []string) map[string][]byte + func (c *Groupcache) Name() string + func (c *Groupcache) Store(ctx context.Context, data map[string][]byte, ttl time.Duration) + type GroupcacheConfig struct + DNSInterval time.Duration + DNSSDResolver dns.ResolverType + GroupcacheGroup string + MaxSize model.Bytes + Peers []string + SelfURL string + Timeout time.Duration + type InMemoryCache struct + func NewInMemoryCache(name string, logger log.Logger, reg prometheus.Registerer, conf []byte) (*InMemoryCache, error) + func NewInMemoryCacheWithConfig(name string, logger log.Logger, reg prometheus.Registerer, ...) (*InMemoryCache, error) + func (c *InMemoryCache) Fetch(ctx context.Context, keys []string) map[string][]byte + func (c *InMemoryCache) Name() string + func (c *InMemoryCache) Store(ctx context.Context, data map[string][]byte, ttl time.Duration) + type InMemoryCacheConfig struct + MaxItemSize model.Bytes + MaxSize model.Bytes + type IterCodec interface + Decode func(cachedData []byte) ([]string, error) + Encode func(files []string) ([]byte, error) + type IterConfig struct + Codec IterCodec + TTL time.Duration + type MemcachedCache struct + func NewMemcachedCache(name string, logger log.Logger, memcached cacheutil.RemoteCacheClient, ...) *MemcachedCache + func (c *MemcachedCache) Fetch(ctx context.Context, keys []string) map[string][]byte + func (c *MemcachedCache) Name() string + func (c *MemcachedCache) Store(ctx context.Context, data map[string][]byte, ttl time.Duration) + type OperationConfig struct + Cache Cache + Matcher func(name string) bool + type RedisCache struct + func NewRedisCache(name string, logger log.Logger, redisClient *cacheutil.RedisClient, ...) *RedisCache + func (c *RedisCache) Fetch(ctx context.Context, keys []string) map[string][]byte + func (c *RedisCache) Name() string + func (c *RedisCache) Store(ctx context.Context, data map[string][]byte, ttl time.Duration) + type TracingCache struct + func (t TracingCache) Fetch(ctx context.Context, keys []string) (result map[string][]byte) + func (t TracingCache) Name() string + func (t TracingCache) Store(ctx context.Context, data map[string][]byte, ttl time.Duration)