cache

package module
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 5 Imported by: 1

README

badger-cache

implements a gocacher with 0 code:

import (
    _ "github.com/gocacher/badger-cache/easy"
    "github.com/gocacher/cacher"
)

//then enjoy it youself
func yourFunc(){
  cacher.XXX()  //see github.com/gocacher/cacher Cacher interface
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCachePath = "cache"

Functions

func New

func New() cacher.Cacher

Types

type BadgerCache

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

func (*BadgerCache) Clear

func (b *BadgerCache) Clear() error

func (*BadgerCache) Delete

func (b *BadgerCache) Delete(key string) error

func (*BadgerCache) DeleteMultiple

func (b *BadgerCache) DeleteMultiple(keys ...string) error

func (BadgerCache) Get

func (b BadgerCache) Get(key string) ([]byte, error)

func (BadgerCache) GetD

func (b BadgerCache) GetD(key string, v []byte) []byte

func (BadgerCache) GetMultiple

func (b BadgerCache) GetMultiple(keys ...string) (map[string][]byte, error)

func (BadgerCache) Has

func (b BadgerCache) Has(key string) (bool, error)

func (*BadgerCache) Set

func (b *BadgerCache) Set(key string, val []byte) error

func (*BadgerCache) SetMultiple

func (b *BadgerCache) SetMultiple(values map[string][]byte) error

func (*BadgerCache) SetWithTTL

func (b *BadgerCache) SetWithTTL(key string, val []byte, ttl int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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