cache

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 0 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 {
	// Get gets the thumbnail if stored in the cache
	Get(file, etag string, width, height int) ([]byte, error)
	// Set adds the thumbnail in the cache
	Set(file, etag string, width, height int, data []byte) error
}

Cache is the interface for a thumbnail cache

func NewNoCache

func NewNoCache() Cache

NewNoCache creates a dummy cache that does not cache anything

type ErrNotFound

type ErrNotFound struct{}

ErrNotFound is the error returned by the cache when the requested thumbnail is not in the cache

func (ErrNotFound) Error

func (ErrNotFound) Error() string

Error implements the Error interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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