cache

package
v0.99.29 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) (interface{}, bool)

Get gets a value from the global memory cache. If the value is missing or the TTL has passed then it will return (nil, false).

func Set

func Set(key string, val interface{})

Set sets a value in the cache without a TTL

func SetWithTTL

func SetWithTTL(key string, val interface{}, ttl time.Duration)

SetWithTTL sets a value in the global memory cache with a TTL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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