Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
20 lines (16 sloc) 331 Bytes
package fizzbuzz
type inMemCache struct {
dict map[int]string
func NewInMemoryCache() Cache{
return &inMemCache{
dict: make(map[int]string),
func (c *inMemCache) Put(key int, value string){
c.dict[key] = value
func (c *inMemCache) Get(key int) (string, bool) {
str, ok := c.dict[key]
return str, ok