Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCanceled = errors.New("operation was canceled")
)
Functions ¶
func FromCache ¶
func FromCache(name string, c *cache.Cache) storage.ManagedStorage
func NewDefault ¶
func NewDefault(name string) storage.ManagedStorage
func OpenDatabase ¶ added in v1.4.3
func OpenDatabase(options ...Option) *cache.Cache
Types ¶
type Option ¶ added in v1.4.2
type Option interface {
// contains filtered or unexported methods
}
Option configures memory storage using the functional options paradigm popularized by Rob Pike and Dave Cheney. If you're unfamiliar with this style, see https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html and https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis.
func WithCleanupInterval ¶ added in v1.4.2
func WithDefaultExpiration ¶ added in v1.4.2
Click to show internal directories.
Click to hide internal directories.