Forum Discussion
Claudius
2 years agoBoss
I would at least upgrade it to API v2 with something like this untested code:
<#assign userData = (liql('SELECT login, user_badges FROM users WHERE id="${res.author.id}"').data.items) />
${userData.user_badges.size}
That won't solve for having to repeatedly call this within a thread where the same author appears multiple times though. The article on caching states that it's not worth caching a users login and avatar, so following this argument it's probably not worth caching the badge count 😇
Related Content
- 5 years ago