Problem/Motivation

We install and configured this module a while ago on our website but at the time did not set the cache header. We have thousands of images loaded into our s3 bucket at this point. We would like to retroactively set the cache header on all of these images. Currently, our dev and production environments all pull from the same s3 bucket so we can't test this out before we impact our production env.

I believe our steps should be ...
1.) In configuration settings, add cache-header to "S3 Object Cache-Control Header" text box (ex. public, max-age=31536000)

2.) Under actions, click "Refresh file metadata cache" button to apply new cache header

Questions:

Will refreshing the metadata cache cause any downtime on my website while images are being updated with new metadata? Will images be available or can I expect images to disappear and reappear on my website?

Are there any steps I am missing to achieve the goal of setting the cache-header?

Thanks in advance!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

lthom8963 created an issue. See original summary.

cmlara’s picture

It appears this issue may have been blocked by the D.O. for a couple weeks and was just recently released for maintainers.

click "Refresh file metadata cache" button to apply new cache header

This will trigger the S3FS module to iterate over the bucket and read the data, S3FS will not change the metadata during a refresh.

Your steps would be along the lines of:

  1. Update the configuration option
  2. Using external tools (AWS UI, AWS CLI, other) update all existing objects with the new metadata
  3. Refresh the metadata cache from S3FS (changing object metadata requires an object to be copy/replaced creating a new VersionID)
  4. Clear the Drupal Cache

Until the cache is fully updated S3FS will operate using the existing data (new data is loaded into a temporary table before replacing the existing data). Assuming the existing VersionID is not immediately removed from the bucket there should be no visitor impact.

During the refresh it is recommended that operations that modify the bucket should be suspended (do not allow writes/deletes to the bucket) as those may not be captured in the final dataset.

cmlara’s picture

Status: Active » Fixed

More than 2 weeks without additional followup by reporter I am assuming the questions have been answered.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.