Forum Discussion
abenton
2 years agoPractitioner II
Connected Content Order of Operations-- :save :retry :cache_max_age?
Hi all, is there a specific order I need to have :save, :retry, and :cache_max_age in on an API call? Example attached... we're seeing some interesting behavior where cache doesn't seem to be working...
Arso
2 years agoPractitioner III
abenton what's the intended behavior and what do you see? It might help troubleshoot this. Does it keep making API calls with the same parameters within the 20 minutes you've set for the cache age?
I don't think that the order of operations plays a role here and I couldn't find any documentation on it either, but to be safe, I'd set the cache age first, then retry and ultimately save.
There's something in the documentation about Braze using a volatile cache system and the data being removed from cache earlier than expected.
Connected Content cache time can be configured to be longer with :cache_max_age, as shown in the following example. The minimum cache time is 5 minutes and the maximum cache time is 4 hours. Connected Content data is cached in-memory using a volatile cache system, such as memcached. As a result, regardless of the specified cache time, Connected Content data may be evicted from Braze’s in-memory cache earlier than specified. This means the cache durations are suggestions and may not actually represent the duration that the data is guaranteed to be cached by Braze and you may see more Connected Content requests than you may expect with a given cache duration.
https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/connected_content/local_connected_content_variables/#configurable-caching
Related Content
- 3 months ago
- 4 months ago
- 2 years ago