mgocache

package module
v0.0.0-...-bbe054f Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2015 License: MIT Imports: 4 Imported by: 0

README

go-mgo-cache

Package mgocache provides an implementation of httpcache.Cache that stores and retrieves data using Mongo (mgo).

Documentation

Overview

Package mgocache provides an implementation of httpcache.Cache that stores and retrieves data using Mongo.

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