WSDOT / wsdot-website

Codebase for WSDOT's public Drupal 7 website hosted on Acquia.
0 stars 4 forks source link

Install and evaluate Rules module #525

Closed waynedyck closed 3 years ago

waynedyck commented 4 years ago

The Rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules).

In concert with issue #521 , after identifying pages that aren't purged, you can configure Acquia Purge to handle them. To do this, you'll use the Rules module and the Clear pages on Acquia Cloud rule action. You can then trigger the rule based on whatever condition you set. As a best practice, configure the rule to purge specific pages often instead of regenerating the cache for your entire site every few minutes.

waynedyck commented 4 years ago

Not sure the Rules module needs to be enabled. So far, the default cache expiration settings and using "ferries" for a custom URL to expire appears to be working.

waynedyck commented 3 years ago

Will likely leave module installed, however, not activated until I can determine if the default caching strategy is working.

waynedyck commented 3 years ago

Reopening to take another look at it. Ferries home page cache is being cleared when nodes are updated, however, only for logged in users. Anonymous users are still seeing the cached page.

The cache is cleared for logged in and anonymous users whenever a node is updated. During off hours, when not much is being published is where we are running into issues with the cache not being cleared in a timely fashion.

waynedyck commented 3 years ago

I have setup a custom rule to specifically clear the cache for the "ferries" path when a cron task runs. Going to try triggering the cron URL from within the Python script which updates the data file when there are new alert bulletins.

waynedyck commented 3 years ago

Still not working correctly. Turns out Acquia Purge does purge from cron by default. The client-side AJAX processing works well for most websites, so adding additional cron runs isn't a required default setting, but it will improve the interval your queue is checked and processed at. As of Acquia Purge 7.x-1.0, it is possible to add this to your settings.php file:

$conf['acquia_purge_cron'] = TRUE;

Added in commit a5415d8d1c7c3530b7718a199ecdf97687a7d151

waynedyck commented 3 years ago

Even though the configuration for the action, Clear pages on Acquia Cloud says it needs an, Absolute URL or internal path of page to clear, using the relative path, ferries doesn't appear to work.

One needs to specify an absolute URL in the form of, https://wsdot.wa.gov/ferries in order to trigger acquia_purge and have it actually clear the load balancers.

waynedyck commented 3 years ago

Continuing to monitor bulletin updates and cache clearing times today.

waynedyck commented 3 years ago

Clearing the page cache through cron appears to be working now as expected.