0

I have a drupal 7 site on acquia and everytime one of my editor makes changes to content, I have to manually clear the varnish cache for him. Is there a way to fire this clear cache everytime he saves a content? Also clear cache doesnt work, as I have to goto the acquia admin panel and click on clear varnish cache. What are some work arounds to this?

I actually have the Acquia purge button, is this what is used to clear the varnish cache? But it seems like that is failing:

enter image description here

0

Not sure if this module would work for you, https://www.drupal.org/project/acquia_flush_varnish

Another module that you could check, https://www.drupal.org/project/acquia_purge

 

If neither one works, you can leverage Acquia's API.

DELETE /sites/:site/envs/:env/domains/:domain/cache

An example from them,

curl -s -u user:pass -X DELETE \ https://example.com/v1/sites/site/envs/prod/domains/example.com/cache.json

# Replace 'sitename' below with the appropriate value. curl -X PURGE -H "X-Acquia-Purge:sitename" -H "Accept-Encoding: gzip" http://example.com/path/to/page

A module that executes that when saving nodes, or a particular content type, should be easy.

  • Isn't this what Acquia Purge does, essentially? – Kevin Jan 5 '17 at 19:50
  • Not sure Kevin, I haven't used that one. But from their description, Owners of Drupal 7 sites are advised to schedule at least one week of testing and tuning to ensure that every section of their site is covered, as the expire module won't cover everything and requires them to set up rules. See its README, installation instructions and especially its domains documentation. So I guess they implement something more. I will update the answer with that module as well though. Maybe it will work for someone. – rovr138 Jan 5 '17 at 19:55
0

It seems that you MUST have drush setup with alias to do a drush ap-forget command targeting the production servers. Setting up aliases isn't that easy.

After running that command the page now renders properly:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.