driver

package
v2.286.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package driver provides cache driver constructors for go-service.

Index

Constants

View Source
const ErrExpired = cachego.ErrCacheExpired

ErrExpired is an alias for cachego.ErrCacheExpired.

Variables

View Source
var ErrNotFound = errors.New("cache: driver not found")

ErrNotFound is returned when the configured cache driver is unknown.

Functions

func IsExpiredError added in v2.243.0

func IsExpiredError(err error) bool

IsExpiredError reports whether err represents an expired cache entry.

Types

type Driver

type Driver = cachego.Cache

Driver is an alias for cachego.Cache.

func NewDriver added in v2.73.0

func NewDriver(fs *os.FS, cfg *cache.Config) (Driver, error)

NewDriver constructs a cache driver for the configured backend.

It returns nil when caching is disabled.

Jump to

Keyboard shortcuts

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