faf-java-api icon indicating copy to clipboard operation
faf-java-api copied to clipboard

[clan] updating a clan will not purge the cache

Open fcaps opened this issue 2 years ago • 3 comments

there is an ux issue if the clan is getting updated (join/leave/edit) if will not show up directly due a 5min cache in elide. is there something we can do without making it too complex?

the endpoint i am talking about /data/clan/${id}?include=memberships.player

fcaps avatar Dec 10 '23 10:12 fcaps

In the ClanService you need to inject the CacheManager and when you create/update/delete a clan, you need to get the cache with key Clan.TYPE_NAME and clear it.

Brutus5000 avatar Dec 19 '23 14:12 Brutus5000

Why not just use @CacheEvict on the method?

Sheikah45 avatar Dec 19 '23 15:12 Sheikah45

That might work too. Not the expert on caching

Brutus5000 avatar Dec 19 '23 20:12 Brutus5000