1
0
forked from MTSR/mapserver
mapserver/server/mapblockaccessor/update.go
2019-03-13 10:41:37 +01: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)
}