raguv12ps
5 years agoAce
User Caching
Hi, I am trying to cache output of below util using usercache ${utils.digest.hmac("12345678901234567890123456789012", "This is my message")} Is it possible to achieve this? Thanks and Regards, ...
- 5 years ago
You would use these functions. https://developer.khoros.com/khoroscommunitydevdocs/reference/usercache-1
Example:
<#assign key = "digest"+user.id /> <#assign digest = usercache.get(key,"") /> <#if digest == ""> <#assign val = utils.digest.hmac("12345678901234567890123456789012", "This is my message") /> ${usercache.put(key,val)} </#if>