cache

package
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Index() (int64, error)
	Get(path []byte, host []byte) (string, io.Reader, int, bool)
	Source() source.Source
	Iter() <-chan KeyValue
	Store(path []byte, host []byte, instance *commonInstance)
}

type CachedInstance

type CachedInstance struct {
	RelativePath string
	AbsolutePath string
	Data         []byte
	ContentType  string
	LoadTime     time.Time
}

type HashMapCache added in v0.5.0

type HashMapCache struct {
	// contains filtered or unexported fields
}

func NewHashMapCache added in v0.5.0

func NewHashMapCache(source source.Source, hosts bool) (*HashMapCache, error)

func (*HashMapCache) Get added in v0.5.0

func (c *HashMapCache) Get(path []byte, host []byte) (string, io.Reader, int, bool)

func (*HashMapCache) Index added in v0.5.0

func (c *HashMapCache) Index() (int64, error)

func (*HashMapCache) Iter added in v0.5.0

func (c *HashMapCache) Iter() <-chan KeyValue

func (*HashMapCache) Source added in v0.5.0

func (c *HashMapCache) Source() source.Source

func (*HashMapCache) Store added in v0.5.0

func (c *HashMapCache) Store(path []byte, host []byte, instance *commonInstance)

type KeyValue added in v0.5.0

type KeyValue struct {
	Key   string
	Value *commonInstance
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL