recommended dispatcher cache flush after a build | Community
Skip to main content
New Participant
February 5, 2016
Solved

recommended dispatcher cache flush after a build

  • February 5, 2016
  • 3 replies
  • 1711 views

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

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 joerghoh

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

3 replies

New Participant
February 6, 2016

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).

joerghoh
joerghohAccepted solution
Employee
February 6, 2016

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

Kunal_Gaba_
New Participant
February 5, 2016

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.