Boban Dragojlovic
02/12/2025, 5:37 PMCeligo AI
02/12/2025, 5:37 PMAI generated answer (using internal Slack threads):It seems like you're having an issue with the cache loader function being called every time, even though the time-to-live (TTL) is set to 300. From the conversations, it's clear that the TTL in the cache module of NetSuite is not a guarantee that the data will persist for the entire duration. The data in the cache could be dumped before the TTL expires. When you use the
get
method that specifies the loader, it has the TTL. When the TTL expires, the lookup value would be null, so it should then use the loader. This process repeats itself.
However, it's important to note that the loader function does not allow you to return the TTL, only the data. If you need to set the TTL, you would have to use the put
method in combination with the get
method, rather than just using the get/loader
implementation.
If the data isn't available for some reason, and the cache loader function is called, it's a low penalty for failure.
Remember to refresh your web page with cache to see the changes.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/12/2025, 5:37 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803922713
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.802736044
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.783028126
Celigo AI
02/12/2025, 5:37 PM