Expand my Community achievements bar.

SOLVED

recommended dispatcher cache flush after a build

Avatar

Level 4

I have a question on clearing dispatcher cache as part of deployment.

Our maven build file uses curl process to deploy to authors and publisher instances and we have bamboo for continuous integration. There are TWO options as I see it for clearing dispatcher cache...

  1. Use bamboo to trigger post-build command to clear the cache 
  2. clear the cache using curl from within maven

I believe both can & will be triggered on successful deployment ONLY.

Now, I need recommendations on which one is the right approach

if there is a third way which is recommended, pls do let me know.

/Kanwal

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

In both approaches you tie the cleaning of the cache to a run of a build tool. This might work for lower environments, but not for production systems. If you only do scheduled builds, you could also create a cron-job on the server (or any other scheduler-based approach) to clear the dispatcher cache.

Jörg

View solution in original post

3 Replies

Avatar

Employee Advisor

I would go with option 1 as in principle you use maven to build the artifacts only once when you deploy on DEV and then for higher environments you should deploy the same built artifacts. Building the artifacts again is not recommended as you only want the verified and tested artifacts to be deployed on higher environments. 

Avatar

Correct answer by
Employee Advisor

Hi,

In both approaches you tie the cleaning of the cache to a run of a build tool. This might work for lower environments, but not for production systems. If you only do scheduled builds, you could also create a cron-job on the server (or any other scheduler-based approach) to clear the dispatcher cache.

Jörg

Avatar

Level 8

I think rather than there being a best way, this is more something that works for you, your team and how you handle projects.

With my team, we do option #1 and on successful build we trigger a script to clear the cache - that said - it's only in staging.  For production releases we do everything manually as there is a single point of failure (the person doing the release).