cache

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir(cacheDir string) string

DefaultDir returns the effective GOLANGCI_LINT_CACHE setting.

func NewDiskCacheManager

func NewDiskCacheManager(cacheDir string) (*diskCacheManager, error)

func Open

func Open(dir string) (*diskCacheManager, error)

Open opens and returns the cache in the given directory.

It is safe for multiple processes on a single machine to use the same cache directory in a local file system simultaneously. They will coordinate using operating system file locks and may duplicate effort but will not corrupt the cache.

However, it is NOT safe for multiple processes on different machines to share a cache directory (for example, if the directory were stored in a network file system). File locking is notoriously unreliable in network file systems and may not suffice to protect the cache.

Types

type HashCacheManager

type HashCacheManager interface {
	Put(ctx context.Context, key string, value map[string]string) error
	Get(ctx context.Context, key string) (map[string]string, error)
}

func NewHashCacheManager

func NewHashCacheManager(cachedEnabled bool, cacheDir string) (HashCacheManager, error)

Jump to

Keyboard shortcuts

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