Search
Clear search
Close search
Google apps
Main menu

Caching on Project Shield

Caching is a feature of Project Shield and part of Project Shield’s DDoS defenses. 

Project Shield respects the cache control headers for all resources and HTML that your site serves. If no cache control headers are present, Project Shield will cache content by default.

Enabling caching for your website maximizes Project Shield’s DDoS mitigation and may also improve your website's performance. 

Set your cache settings

Caching on Project Shield is in your control based on your cache control headers. You can adjust caching settings by editing your cache control headers. Learn more about cache control HTTP headers.

Here is an example of cache control headers:

Cache for 1 hour (suitable for Javascript and CSS)
cache-control:max-age=3600

Cache for 1 day (suitable for images - jpg, png, gifs) cache-control:max-age=86400

Not cacheable (suitable for HTML) cache-control:no-cache,private

Project Shield will fetch new content from your website server (or re-validate that the content in cache is still valid) when content is requested after your cache control headers expire.

For example, if your site’s homepage has cache control headers set to 1 hour, then Project Shield will serve your content from cache for an hour. After that time, Project Shield will revalidate on the next request for your content, and retrieve the latest version from your server if your content changed and store that version in cache.

If no cache control headers are present, Project Shield will cache content by default.

Your Project Shield dashboard shows your site’s cache hit rate graph under Site Details. Learn more about traffic and performance graphs.

Turn off caching 

To turn off caching, set your site’s cache control headers to “cache-control: no-cache, private.” 

With this setting, Project Shield will never cache your website and will send all requests and traffic direct to your website server.

If you have a need to turn off caching without using cache-control headers, reach out directly to the Project Shield team through this contact form.

FAQs

Can I purge cached URLs automatically?

Purging cached URLs, or cache invalidation, via API or other functionality is not currently supported by Project Shield. Our team is prioritizing this feature on our product roadmap to add this soon.

Can I adjust individual cache settings?

Project Shield respects cache control headers, so you can adjust cache settings for your site by adjusting your own cache control headers.
If you have additional questions on caching, you can reach the Project Shield team through this contact form.

What are Project Shield’s default cache settings?

To learn Project Shield’s default cache settings, reach out directly to the Project Shield team through this contact form.

Glossary

What is cache or caching?

A cache is a temporary store of data which acts like a copy of your website’s pages, and is collected and stored on Project Shield’s servers for a limited time. 
When your content is cached, users can quickly view frequently accessed web pages and resources such as images.
When someone wants to view your website, serving your content from Project Shield’s cache -- rather than fetching it from your website server — can improve website performance by shortening the time it takes to retrieve your content and reducing latency, as well as reducing the amount of traffic your servers have to handle.
Was this article helpful?
How can we improve it?