Skip to content

langwan/chilru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#chilru

chilru is lru cache, written in go

Install

$ go get github.com/langwan/chilru

Example

package main

import (
	"fmt"
	"github.com/langwan/chilru"
)

func main() {
	lru := chilru.New[string, int](100)
	lru.Add("a", 1)
	lru.Set("b", 2)
	lru.Range(func(k, v any) bool {
		fmt.Println("k", k)
		fmt.Println("v", v)
		return true
	})
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages