memcache

package
v0.0.0-...-59c5d59 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package memcache provides an implementation of httpcache.Cache that uses App Engine's memcache package to store cached responses.

When not built for Google App Engine, this package will provide an implementation that connects to a specified memcached server. See the memcache.go file in this package for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	context.Context
}

Cache is an implementation of httpcache.Cache that caches responses in App Engine's memcache.

func New

func New(ctx context.Context) *Cache

New returns a new Cache for the given context.

func (*Cache) Delete

func (c *Cache) Delete(key string)

Delete removes the response with key from the cache.

func (*Cache) Get

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

Get returns the response corresponding to key if present.

func (*Cache) Set

func (c *Cache) Set(key string, resp []byte)

Set saves a response to the cache as key.

Jump to

Keyboard shortcuts

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