redis

command
Version: v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2017 License: MIT Imports: 7 Imported by: 0

README

Basic Usage

This is an example of using Redis with go-cache in a basic scenario. The code generates a random number, stores it in the cache with an expiry of 5 seconds. Once expired, it will regenerate. A loop will show the current number stored in the cache every second.

To run the code from the go-cache root directory, you will need to install the go-cache project, redigo, start a local Redis server, then use go run:

go get github.com/fresh8/go-cache
go get github.com/garyburd/redigo
go run docs/example/redis/redis-basic.go

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

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