Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

jimlindeman/cache

Open more actions menu
 
 

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")

About

Caching package for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.