cache

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cache provides compatibility with the cache package that was moved. This file exists to maintain backward compatibility with code that imports cache from the odp/cache package. New code should import from pkg/cache directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Save(key string, value interface{})
	Lookup(key string) interface{}
	Reset()
}

Cache is used for caching ODP segments Maintained for backward compatibility - use github.com/optimizely/go-sdk/v2/pkg/cache.Cache for new code

type LRUCache

type LRUCache struct {
	*pkgCache.LRUCache
}

LRUCache wraps the cache.LRUCache to maintain backward compatibility

func NewLRUCache

func NewLRUCache(size int, timeout time.Duration) *LRUCache

NewLRUCache returns a new instance of Least Recently Used in-memory cache Deprecated: For new code, use pkg/cache directly instead. This function exists for backward compatibility with code that imports from pkg/odp

Jump to

Keyboard shortcuts

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