mapserver/server/mapblockaccessor/update.go

14 lines
284 B
Go
Raw Normal View History

2019-02-10 22:27:53 +03:00
package mapblockaccessor
import (
"mapserver/coords"
"mapserver/mapblockparser"
cache "github.com/patrickmn/go-cache"
)
func (a *MapBlockAccessor) Update(pos *coords.MapBlockCoords, mb *mapblockparser.MapBlock) {
key := getKey(pos)
a.c.Set(key, mb, cache.DefaultExpiration)
}