26
Views
4
Comments
Invalidate the cache for a server action in the CS layer to reflect changes in the UI
Question
Application Type
Reactive
Service Studio Version
11.55.14 (Build 64054)
Platform Version
11.32.0 (Build 44177)

We have a timer that updates data in DB_1 every 24 hours.

We also have a cached server action (in the CS_layer) that holds the data from DB_1.

After the timer runs, we invalidate the cache so that the new data is reflected in the cached server action.

The problem is that this data is used in a block within another application, Common_CW, which is in turn used on four end-user UI screens across four other applications.

After invalidating the cached server action, the old data is still being used. The new cache data is only utilized if we republish Common_CW and the four UI applications.

We have already tried EspaceInvalidateCache and TenantInvalidateCache, but neither resolved the issue.

How can we push the updated cached data to the front end?

2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @alain buysse 

Use client-side cache management techniques (such as session storage or local storage) to ensure the front-end fetches updated data after cache invalidation. 

Thanks

2025-01-31 03-15-38
Irfan Ahamed Abdul Shukoor

Hi @alain buysse ,


Please check this forge component, this will help you solve your issue regarding cache management, also you can use the update cache in the front end.

https://www.outsystems.com/forge/component-overview/2827/application-cache-o11


Thank & Regards,
Irfan

2023-03-24 11-55-45
Pawan Purohit

Hi,
Since the cached data is inside a block (Common_CW) used across multiple UI applications, those screens may still reference the old cache. 
1. Inside Common_CW, create an event that forces a refresh.
2. When the timer invalidates the cache, also trigger this event in Common_CW, which will force a refresh of the block inside the consuming UI screens.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.