Versions in this module Expand all Collapse all v0 v0.0.0 Jan 18, 2024 Changes in this version + const HashPrefixDirPrefixLen + func GenerateCacheFromConfig(cacheCfg *config.CacheConfig) interfaces.Cache + func NewComposedCache(inner, outer interfaces.Cache, mode CacheMode) interfaces.Cache + func NewDiskCache(cfg *config.Cache) interfaces.Cache + func NewMemoryCache(cfg *config.Cache) interfaces.Cache + func NewRedisCache(cfg *config.Cache) interfaces.Cache + type CacheMode uint32 + const ModeReadThrough + const ModeWriteThrough + type ComposedCache struct + func (c *ComposedCache) Check(ctx context.Context) error + func (c *ComposedCache) Contains(ctx context.Context, d *repb.Digest) (bool, error) + func (c *ComposedCache) Delete(ctx context.Context, d *repb.Digest) error + func (c *ComposedCache) FindMissing(ctx context.Context, digests []*repb.Digest) ([]*repb.Digest, error) + func (c *ComposedCache) Get(ctx context.Context, d *repb.Digest) ([]byte, error) + func (c *ComposedCache) GetMulti(ctx context.Context, digests []*repb.Digest) (map[*repb.Digest][]byte, error) + func (c *ComposedCache) Reader(ctx context.Context, d *repb.Digest, offset int64) (io.ReadCloser, error) + func (c *ComposedCache) Set(ctx context.Context, d *repb.Digest, data []byte) error + func (c *ComposedCache) SetMulti(ctx context.Context, kvs map[*repb.Digest][]byte) error + func (c *ComposedCache) Size() int64 + func (c *ComposedCache) WithIsolation(ctx context.Context, cacheType interfaces.CacheType, remoteInstanceName string) (interfaces.Cache, error) + func (c *ComposedCache) Writer(ctx context.Context, d *repb.Digest) (io.WriteCloser, error) + type DiskCache struct + func (c *DiskCache) Check(ctx context.Context) error + func (c *DiskCache) Contains(ctx context.Context, d *repb.Digest) (bool, error) + func (c *DiskCache) Delete(ctx context.Context, d *repb.Digest) error + func (c *DiskCache) FindMissing(ctx context.Context, digests []*repb.Digest) ([]*repb.Digest, error) + func (c *DiskCache) Get(ctx context.Context, d *repb.Digest) ([]byte, error) + func (c *DiskCache) GetMulti(ctx context.Context, digests []*repb.Digest) (map[*repb.Digest][]byte, error) + func (c *DiskCache) Reader(ctx context.Context, d *repb.Digest, offset int64) (io.ReadCloser, error) + func (c *DiskCache) Set(ctx context.Context, d *repb.Digest, data []byte) error + func (c *DiskCache) SetMulti(ctx context.Context, kvs map[*repb.Digest][]byte) error + func (c *DiskCache) Size() int64 + func (c *DiskCache) WithIsolation(ctx context.Context, cacheType interfaces.CacheType, remoteInstanceName string) (interfaces.Cache, error) + func (c *DiskCache) Writer(ctx context.Context, d *repb.Digest) (io.WriteCloser, error) + type MapEntry struct + Key string + Size int64 + type MemoryCache struct + func (m *MemoryCache) Check(ctx context.Context) error + func (m *MemoryCache) Contains(ctx context.Context, d *repb.Digest) (bool, error) + func (m *MemoryCache) Delete(ctx context.Context, d *repb.Digest) error + func (m *MemoryCache) FindMissing(ctx context.Context, digests []*repb.Digest) ([]*repb.Digest, error) + func (m *MemoryCache) Get(ctx context.Context, d *repb.Digest) ([]byte, error) + func (m *MemoryCache) GetMulti(ctx context.Context, digests []*repb.Digest) (map[*repb.Digest][]byte, error) + func (m *MemoryCache) Reader(ctx context.Context, d *repb.Digest, offset int64) (io.ReadCloser, error) + func (m *MemoryCache) Set(ctx context.Context, d *repb.Digest, data []byte) error + func (m *MemoryCache) SetMulti(ctx context.Context, kvs map[*repb.Digest][]byte) error + func (m *MemoryCache) Size() int64 + func (m *MemoryCache) WithIsolation(ctx context.Context, cacheType interfaces.CacheType, remoteInstanceName string) (interfaces.Cache, error) + func (m *MemoryCache) Writer(ctx context.Context, d *repb.Digest) (io.WriteCloser, error) + type Metrics struct + Total int64 + func (m *Metrics) GetHit() int64 + func (m *Metrics) GetHitRate() float64 + func (m *Metrics) GetMiss() int64 + func (m *Metrics) GetTotal() int64 + func (m *Metrics) Hit() + func (m *Metrics) Miss() + type MultiCloser struct + func (m *MultiCloser) Close() error + type ReadCloser struct + type RedisCache struct + func (r *RedisCache) Check(ctx context.Context) error + func (r *RedisCache) Contains(ctx context.Context, d *repb.Digest) (bool, error) + func (r *RedisCache) Delete(ctx context.Context, d *repb.Digest) error + func (r *RedisCache) FindMissing(ctx context.Context, digests []*repb.Digest) ([]*repb.Digest, error) + func (r *RedisCache) Get(ctx context.Context, d *repb.Digest) ([]byte, error) + func (r *RedisCache) GetMulti(ctx context.Context, digests []*repb.Digest) (map[*repb.Digest][]byte, error) + func (r *RedisCache) Reader(ctx context.Context, d *repb.Digest, offset int64) (io.ReadCloser, error) + func (r *RedisCache) Set(ctx context.Context, d *repb.Digest, data []byte) error + func (r *RedisCache) SetMulti(ctx context.Context, kvs map[*repb.Digest][]byte) error + func (r *RedisCache) Size() int64 + func (r *RedisCache) WithIsolation(ctx context.Context, cacheType interfaces.CacheType, remoteInstanceName string) (interfaces.Cache, error) + func (r *RedisCache) Writer(ctx context.Context, d *repb.Digest) (io.WriteCloser, error)