Skip to content

oli-g/cache

This branch is 70 commits behind koding/cache:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

487fc0c · Sep 12, 2014

History

43 Commits
Sep 7, 2014
Sep 7, 2014
Jul 27, 2014
Sep 12, 2014
Sep 8, 2014
Sep 12, 2014
Sep 12, 2014
Sep 12, 2014
Sep 12, 2014
Sep 12, 2014
Sep 8, 2014
Sep 8, 2014
Sep 12, 2014
Sep 12, 2014
Sep 8, 2014
Sep 12, 2014

Repository files navigation

Cache GoDoc Build Status

Cache is a backend provider for common use cases

Install and Usage

Install the package with:

go get github.com/koding/cache

Import it with:

import "github.com/koding/cache"

Example

// create a cache with 2 second TTL
cache := NewMemoryWithTTL(2 * time.Second)
// start garbage collection for expired keys
cache.StartGC(time.Millisecond * 10)
// set item
err := cache.Set("test_key", "test_data")
// get item
data, err := cache.Get("test_key")

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%