This is a cache library with expiration functionality.
c := memory_cache.New()
// Set
c.Set("test_float", 1)
// GetFloat
fmt.Println(c.GetFloat("test_float")) // 1 true
// Delete
c.Delete("test_float")
fmt.Println(c.GetFloat("test_float")) // 0 false
// GetString
c.Set("test_str", "hello world")
fmt.Println(c.GetString("test_str")) // hello world true
// expire
c.Set("test_expire", 1, 1)
fmt.Println(c.GetInt("test_expire")) // 1 true
time.Sleep(time.Second)
fmt.Println(c.GetInt("test_expire")) // 0 false