How to invalidate cache in RolloutConfigManager? | Community
Skip to main content
Level 4
October 16, 2015
Solved

How to invalidate cache in RolloutConfigManager?

  • October 16, 2015
  • 3 replies
  • 969 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

You can start & stop bundle using api http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Bundle.html

3 replies

Adobe Employee
October 16, 2015

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

Level 4
October 16, 2015

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?

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015