bigslice: Index | Files

package slicecache

import ""


Package Files

slicecache.go sliceio.go

type Cacheable Uses

type Cacheable interface {
    Cache() *ShardCache

Cacheable indicates a slice's data should be cached.

type ShardCache Uses

type ShardCache struct {
    // contains filtered or unexported fields

ShardCache accesses cached data for a slice's shards. A nil *ShardCache has no cached data.

func NewShardCache Uses

func NewShardCache(ctx context.Context, prefix string, numShards int) (*ShardCache, error)

NewShardCache constructs a ShardCache. It does O(numShards) parallelized file operations to look up what's present in the cache.

func (*ShardCache) CacheReader Uses

func (c *ShardCache) CacheReader(shard int) sliceio.Reader

CacheReader returns a reader that reads from the cache.

func (*ShardCache) IsCached Uses

func (c *ShardCache) IsCached(shard int) bool

func (*ShardCache) RequireAllCached Uses

func (c *ShardCache) RequireAllCached()

func (*ShardCache) WritethroughReader Uses

func (c *ShardCache) WritethroughReader(shard int, reader sliceio.Reader) sliceio.Reader

WritethroughReader returns a reader that populates the cache. reader should read computed data.

Package slicecache imports 9 packages (graph) and is imported by 2 packages. Updated 2020-01-18. Refresh now. Tools for package owners.