...

Package cache

import "github.com/gonitro/nitro/app/cache"
Overview
Index
Subdirectories

Overview ▾

Package cache is a caching interface

type Cache

Cache is an interface for caching

type Cache interface {
    // Get a value
    Get(key string) (interface{}, error)
    // Set a value
    Set(key string, val interface{}) error
    // Delete a value
    Delete(key string) error
    // Name of the implementation
    String() string
}

type Option

type Option func(o *Options)

func Nodes

func Nodes(v ...string) Option

Nodes sets the nodes for the cache

type Options

type Options struct {
    Nodes []string
}

Subdirectories

Name Synopsis
..
memory Package memory is an in memory cache