mgocache

package
v0.0.0-...-61f2a12 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// mongo collection where the cache will be stored
	Collection *mgo.Collection
}

Cache objects store and retrieve data using Mongo.

func New

func New(collection *mgo.Collection) *Cache

New returns a new Cache

func (*Cache) Delete

func (self *Cache) Delete(key string)

func (*Cache) Get

func (self *Cache) Get(key string) (resp []byte, ok bool)

func (*Cache) Indexes

func (self *Cache) Indexes()

func (*Cache) Set

func (self *Cache) Set(key string, content []byte)

Jump to

Keyboard shortcuts

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