Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8630091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:58:30+00:00 2026-06-12T08:58:30+00:00

I’m new to AWS CloudFront. I have a simple question that I can’t seem

  • 0

I’m new to AWS CloudFront.
I have a simple question that I can’t seem to figure out.

I have a dynamic site, which is really just a CMS that allows editors to enter articles. Later, the CMS produces static html files (we’re using boost module under drupal 6).

So what I can’t figure out is how to set the cache header for the html files to achieve this outcome:

I want cloudfront to keep the html files for at least an hour, but it must make sure that the file is not modified. If the file is modified it must get it not later than 5 minutes.

Am I making sense?

What I’ve come up with is:

<FilesMatch "\.((html)|((html)\.gz))$">
        ExpiresByType text/html A300
        Header append Cache-Control "must-revalidate"        
  </FilesMatch>

Will it keep the files after 5 minutes if no change was made?

I’ve been having trouble testing myself, because i’m getting different results in different browsers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:58:32+00:00Added an answer on June 12, 2026 at 8:58 am

    The first thing to understand is that CloudFront is a cache. Caches will not check to see if the file has changed. They will simply continue serving whatever is cached until that cache expires.

    You appear to be posting code that tells your Apache web server how to serve files out, but this is completely unrelated to Amazon CloudFront. CloudFront (being a cache itself) has its own cache settings, and doesn’t follow Apache’s.

    The default duration of cached data is 24 hours. You can configure CloudFront to cache for as little as 1 hour (or perhaps 1 minute nowadays… I don’t recall off-hand). If you need the cache to expire sooner than that, you can request an “invalidation” via the AWS Console or the web service API (you didn’t specify how you’re interacting with CloudFront).

    If you want the cache to invalidate, then you will need to have your Drupal module sent CloudFront an invalidation request whenever it produces new HTML. CloudFront will not check on its own (again, because caches don’t do that).

    From personal experience, it typically takes CloudFront anywhere from 3-15 minutes to clear out all of the cache servers it has running all over the world so that it can pull your fresh content.

    Does this make sense?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a French site that I want to parse, but am running into
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.