1
0
forked from MTSR/mapserver
mapserver/mapblockaccessor/update.go
2019-06-13 08:04:32 +02:00

15 lines
316 B
Go

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)
cacheBlockCount.Inc()
a.blockcache.Set(key, mb, cache.DefaultExpiration)
}