1
0
forked from MTSR/mapserver
mapserver/mapblockaccessor/update.go

15 lines
316 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)
2019-03-13 12:41:37 +03:00
cacheBlockCount.Inc()
a.blockcache.Set(key, mb, cache.DefaultExpiration)
2019-02-10 22:27:53 +03:00
}