func (c *CachingStore) Has(hash string) (bool, error) {
	has, err := c.cache.Has(hash)
	if has || err != nil {
		return has, err
	}
	return c.origin.Has(hash)
}
Has checks the cache and then the origin for a hash. It returns true if either store has it.
package store
import (
	"time"
	"github.com/lbryio/reflector.go/internal/metrics"
	"github.com/lbryio/reflector.go/shared"
	"github.com/lbryio/lbry.go/v2/extras/errors"
	"github.com/lbryio/lbry.go/v2/stream"
	log "github.com/sirupsen/logrus"
)
type CachingStore struct {
	origin, cache BlobStore
	component     string
}
func NewCachingStore(component string, origin, cache BlobStore) *CachingStore {
	return &CachingStore{
		component: component,
		origin:    WithSingleFlight(component, origin),
		cache:     WithSingleFlight(component, cache),
	}
}
const nameCaching = "caching"
func (c *CachingStore) Name() string { return nameCaching }