Skip to content

epgoranova/hcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hcache

Build Status Coverage Status Go Report Card GoDoc MIT License

package main

import (
	"fmt"

	"github.com/s2gatev/hcache"
)

type data struct {
  value int
}

func main() {
  cache := hcache.New()
  cache.Insert(&data{value: 42}, "important", "answer")
  
  // ...
  
  if v, ok := cache.Get("important", "answer"); ok {
    d := v.(*data)
    fmt.Println(d.value) // 42
  }
}

By @s2gatev, @catiepg

About

Hierarchical value store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages