bigslice: github.com/grailbio/bigslice/internal/slicecache Index | Files

package slicecache

import "github.com/grailbio/bigslice/internal/slicecache"

Index

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) IsCached Uses

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

func (*ShardCache) Reader Uses

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

Reader returns a reader that uses the cache, or populates it. reader should read computed data

func (*ShardCache) RequireAllCached Uses

func (c *ShardCache) RequireAllCached()

Package slicecache imports 9 packages (graph) and is imported by 2 packages. Updated 2019-10-02. Refresh now. Tools for package owners.