Skip to content
/ goks Public

[under development] Go in-memory cache algorithm

License

Notifications You must be signed in to change notification settings

hellodit/goks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goks

Go in-memory cache algorithm currently full support LRU Algorithm

Installation

commingsoon

Usage

import (
    "fmt"
    "goks"
    "log"
)

// create cache client to communicate with module with max item 5 
client := goks.NewClient(goks.NewCacheOptions().SetMaxSizeItem(5))

// insert key:value pair to cache
err := client.Set("key-1","value-1")
if err != nil {
    log.Fatal(err)
}

// get cache value by key 
val, err := client.Get("key-1")
if err != nil {
    log.Fatal(err)
}

fmt.Println("Value with given key =>", val)

For further usage, please refer the example folder

Note

  • This Package only for research purpose only
  • Don't use for production purpose

How to contribute?

Just create issue then we discuss

About

[under development] Go in-memory cache algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages