Bobcares

wesupport

CLIENT AREACall Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Prevent CloudFront from caching certain files

by | Jul 24, 2021

Wondering how to prevent CloudFront from caching certain files? We can help you.

At Bobcares we assist our customers with several AWS queries as part of our AWS Support Services for AWS users, and online service providers.

Today, let us see how our Support Techs resolve this CloudFront issue.

 

How to prevent CloudFront from caching certain files?

Today, let us see the configuration used by our Support Techs to prevent caching.

Configuration on the origin

On your custom origin web server application, add Cache-Control no-cache, no-store, or private directives to the objects that you don’t want CloudFront to cache.

Else add Expires directives to the objects that you don’t want CloudFront to cache.

If you’re using Amazon Simple Storage Service as the origin, you can add certain Cache-Control headers using object metadata.

 

Configuration on the distribution

  • Firstly, open the CloudFront console.
  • From your list of CloudFront distributions, choose the distribution that you want to modify.
  • Then, choose the Behaviors tab.
  • If you already have a cache behavior for the objects that you don’t want CloudFront to cache, select the cache behavior and choose Edit.
  • To create a new cache behavior, choose Create Behavior.
  • For Cache and origin request settings, select Use legacy cache settings.
  • In the cache behavior’s settings, enter the following to prevent caching:

In Object Caching, select Customize.
For Minimum TTL, enter 0.
For Maximum TTL, enter 0.

  • Then, choose Yes.
  • Finally, edit to save the changes that you made.

[Need assistance with CloudFront? We are available 24*7]

Conclusion

Today, we saw how our Support Techs prevent CloudFront from caching certain files.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags