caching

package
v0.0.0-...-41ba115 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

Overview

Package caching implements an on-disk cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSCache

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

FSCache provides a simple cache-on-filesystem functionality.

func NewFSCache

func NewFSCache(dirpath string) *FSCache

NewFSCache creates a new simpleCache instance.

func (*FSCache) Get

func (sc *FSCache) Get(key string) ([]byte, error)

Get implements KeyValueStore.Get.

func (*FSCache) Set

func (sc *FSCache) Set(key string, value []byte) error

Set implements KeyValueStore.Set.

func (*FSCache) Trim

func (sc *FSCache) Trim()

Trim removes old cache entries that are likely not to be reused.

SPDX-License-Identifier: BSD-3-Clause

Source: https://github.com/rogpeppe/go-internal/commit/797a764460877f0a4bd570a61d60d10815e728e6

Jump to

Keyboard shortcuts

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