Initial commit
This commit is contained in:
11
adapters/inmemorycache/cache.go
Normal file
11
adapters/inmemorycache/cache.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package inmemorycache
|
||||
|
||||
type Cache map[uint64][]string
|
||||
|
||||
func (c Cache) Get(id uint64) []string {
|
||||
return c[id]
|
||||
}
|
||||
|
||||
func (c Cache) Append(id uint64, ip string) {
|
||||
c[id] = append(c[id], ip)
|
||||
}
|
||||
Reference in New Issue
Block a user