mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
20 lines
225 B
Go
20 lines
225 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/bluele/gcache"
|
|
)
|
|
|
|
func main() {
|
|
gc := gcache.New(10).
|
|
LFU().
|
|
Build()
|
|
gc.Set("key", "ok")
|
|
|
|
v, err := gc.Get("key")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Println("value:", v)
|
|
}
|