I’m trying to use the templateDataStorage API to avoid making multiple requests with the same request options, similar to how stape lookup variables work. However, I’ve encountered an issue where the cache doesn’t seem to function correctly. I’ve confirmed that the API stores the cache value, but when I try to read it during the next execution, it always returns null.
Here is the code I’m using:
and the logs I see:
According to the documentation, the cache is persistent on the server instance and isn’t guaranteed to be 100% reliable. However, in my case, none of the variable responses are being cached at all.
Do you have any thoughts or suggestions on how to address this issue? Would using the Cookie API for persistence be a viable option?