Expand my Community achievements bar.

SOLVED

How to invalidate cache in RolloutConfigManager?

Avatar

Level 4

Hi,
I am using CQ 5.5. When I remove a bundle with custom Live Action, this Live Action disappear in the Components tab (OSGI console).
But RolloutConfigManager still keep this Live Action in a cache.
How can I invalidate cache in Rollout Config Manager without restarting cq or disable/enable RolloutConfigManagerFactoryImpl?

- Alex.

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Level 2

Hello Alex,

This is a known problem in cq 5.5 , only fixed starting CQ 5.6 .

In 5.5, the LiveActionFactories are loaded once and then cached, and there is no way to flush it apart from the solutions you mentioned, or also restarting the msm-core bundle.. 

In 5.6 a new mechanism has been introduced in the RolloutConfigManagerFactory, using a org.osgi.util.tracker.ServiceTrackerCustomizer to listen to OSGI changes on LiveActionFactory Services, and manages another cache of factories according to those changes.

Cheers,
Geoffroy

Avatar

Level 4

Thanks you Geoffroy.

I found that the cache invalidate after the modification under "/etc/msm/rolloutconfigs" folder.
I can add a modification property on activation and deactivation methods in custom Live Actions, but this solution doesn't look nice.
Is it possible to restart a bundle or component in java code?
Is it possible to send a lowest-level event(javax.jcr.observation.Event) from java code?

Do you know better way how to fix it in cq 5.5?

Avatar

Correct answer by
Level 10