Red Hat Bugzilla – Bug 972878
CSS in the site is not invalidated when versions change
Last modified: 2015-05-14 21:23:28 EDT
We may need a way to path prefix assets in production (or move assets completely off the main production servers) so that we can properly generate unique URLs representing a version and globally invalidate them in the community.
May require operational changes to fix.
Fixed in https://github.com/openshift/li/pull/1620
Commit pushed to master at https://github.com/openshift/li
Bug 972878 - More effectively cache assets for the site and community.
Allow the site and Drupal to serve two separate sets of assets (which means double loading) but ensure that CSS can be cleanly versioned during updates.
Add a config page in Drupal to set the openshift_assets_version variable
Use the openshift_assets_version variable in the theme to prefix the load path
Change the devenv to allow /app/assets-*/ to be rewritten to /app/assets/ (for cache busting)
Added release ticket changes to 2.0.29 to support this
After these changes are applied, console will always serve digest resources, and Drupal will always load from the prefixed path.
Release ticket is updated and changes are in devenv.
Tested on devenv_3375, cheked the code, the openshift_assets_version variable is used in the theme to prefix the load path, as following:
sites/all/themes/openshift-theme/template.php: $asset_version = variable_get('openshift_assets_version');
The devenv has /app/assets/ for all the assets.
Ran "cd /usr/share/drupal6; drush variable-set openshift_assets_version "$(date +%Y%m%d)$(date +%H%M%S)"", the openshift_assets_version can be set as following:
[root@ip-10-165-41-19 drupal6]# drush variable-set openshift_assets_version "$(date +%Y%m%d)$(date +%H%M%S)"
openshift_assets_version was set to 20130618022706. [success]
So verify this bug, thanks.