Index | Files

package proxycache

import ""

Package proxycache registers the "proxycache" blobserver storage type, which uses a provided blobserver as a cache for a second origin blobserver.

The proxycache blobserver type also takes a sorted.KeyValue reference which it uses as the LRU for which old items to evict from the cache.

Example config:

      "/cache/": {
          "handler": "storage-proxycache",
          "handlerArgs": {
		  "origin": "",
		  "cache": "",
		  "meta": {},
		  "maxCacheBytes": 536870912


Package Files


func NewCache Uses

func NewCache(maxBytes int64, cache, origin blobserver.Storage) blobserver.Storage

type CacheHasExtraError Uses

type CacheHasExtraError struct {
    Ref  blob.Ref
    Size uint32

func (CacheHasExtraError) Error Uses

func (e CacheHasExtraError) Error() string

type CacheHasWrongSizeError Uses

type CacheHasWrongSizeError struct {
    Ref                   blob.Ref
    OriginSize, CacheSize uint32

func (CacheHasWrongSizeError) Error Uses

func (e CacheHasWrongSizeError) Error() string

type CacheMissingRefError Uses

type CacheMissingRefError struct {
    Ref  blob.Ref
    Size uint32

func (CacheMissingRefError) Error Uses

func (e CacheMissingRefError) Error() string

Package proxycache imports 17 packages (graph) and is imported by 4 packages. Updated 2018-04-25. Refresh now. Tools for package owners.