MCPcopy Index your code
hub / github.com/TruthHun/BookStack / initAdsCache

Function initAdsCache

models/ads.go:212–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210}
211
212func initAdsCache() {
213 o := orm.NewOrm()
214 var pos []AdsPosition
215 o.QueryTable(&AdsPosition{}).All(&pos)
216 for _, item := range pos {
217 key := fmt.Sprintf("%v-%v", item.Identify, item.IsMobile)
218 positionCache.Store(key, item.Id)
219 }
220 UpdateAdsCache()
221}
222
223func UpdateAdsCache() {
224 var (

Callers 1

InitFunction · 0.85

Calls 2

UpdateAdsCacheFunction · 0.85
AllMethod · 0.45

Tested by

no test coverage detected