Hello,

Merely visiting the admin/settings/swftools/handling and admin/settings/swftools/embed pages invokes 'drupal_flush_all_caches'. While I suspect this may be necessary to prevent certain issues, it was very frustrating on a production site of mine recently.

The site is reverse-proxied behind a CDN, so when aggregated CSS files on the origin/local site get cleared, older pages still cached and served by the CDN can reference CSS files that no longer exist on the origin site. Those pages then look awful, since they lack styling. All of the pages cached in the CDN then have to be removed so that the origin site will recreate the necessary CSS files when they are needed.

While the root causes of my issue were: 1) the CDN caching CSS files for a shorter period than pages, and 2) a user with the 'administer flash' permission poking around in the admin pages, I suspect that SWFTools is a bit aggressive in its clearing of all of Drupal's caches in this case.

Do the JS and CSS caches have to be flushed when viewing these pages? Is it possible to use a smaller list of caches to clear? Just the block and page caches, for example, and if the views/ctools modules are enabled, perhaps the views/ctools caches as well?

This particular issue is dealt with in 6.x-3.0, as visiting the admin pages does not seem to invoke 'drupal_flush_all_caches', but a submit handler (swftools_admin_settings_submit) does call it, which seems to my uninformed eye like it might be overkill in that scenario as well.

Thanks for SWFTools!
-G

Comments

gdl’s picture

It appears the default cache_clear_all() implementation for Drupal 6 clears just the block and page caches when called without arguments.