clear revolution trophy cache

This commit is contained in:
Thibault Duplessis 2018-03-08 23:20:13 -05:00
parent bf09a51ddd
commit 6d25894e5b
2 changed files with 6 additions and 3 deletions

View file

@ -94,7 +94,10 @@ final class Env(
autoPairing = autoPairing,
clearJsonViewCache = jsonView.clearCache,
clearWinnersCache = winners.clearCache,
clearShieldCache = () => shieldApi.clear,
clearTrophyCache = tour => {
if (tour.isShield) shieldApi.clear
else if (tour.isUnique) revolutionApi.clear
},
renderer = hub.actor.renderer,
timeline = hub.actor.timeline,
socketHub = socketHub,

View file

@ -26,7 +26,7 @@ final class TournamentApi(
autoPairing: AutoPairing,
clearJsonViewCache: Tournament.ID => Unit,
clearWinnersCache: Tournament => Unit,
clearShieldCache: () => Unit,
clearTrophyCache: Tournament => Unit,
renderer: ActorSelection,
timeline: ActorSelection,
socketHub: ActorRef,
@ -163,7 +163,7 @@ final class TournamentApi(
awardTrophies(tour)
indexLeaderboard(tour)
clearWinnersCache(tour)
clearShieldCache()
clearTrophyCache(tour)
}
}
}