Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding
  1. Home
  2. Blog
  3. Why and how to purge cache
Network
Expert insights
Developers

Why and how to purge cache

  • May 21, 2019
  • 1 min read
Why and how to purge cache

If the content of your service doesn’t change much all you need is to keep it in the CDN cache as long as possible.

But what if you renewed a file on the origin server, but a CDN server returns an old one? Right, you need to purge the CDN cache.

How to purge cache

Option 1. Using API

Option 2. Using the control panel

CDN Resources. On the CDN tab go to the CDN Resources section. Find a CDN Resource which cache you want to purge. In the drop-down list near the Settings button select Purge.

Purge section. On the CDN tab go to the Purge section. If you have two or more CDN Resources select the one which cache you want to purge in the drop-down list.

Purge methods

Purge all. Clears everything from the CDN cache.

Note! Once the CDN cache is empty all requests for the purged content will go to the origin server which might overload it. So if you have a lot of assets we strongly recommend using Selective Purge.

Selective Purge. Specify paths to the files without the domain name. Each path should start from a new line with / or * (* replaces any number of symbols).

How it works

Example 1. Purge by URL:

Example 2.Purge all files from the static directory:

Example 3. Purge all files from the static directory with JPG format:

Example 4. Purge all files with /hd/ in the path:

Keep in mind

Limits

  • 1 request per minute
  • Up to 50 paths in one request

Rewrite

If this option is enabled for the CDN Resource, specify a full path in your purge request.

Check out our new plans

We have updated our tariff plans and added a new FREE plan. Sign up for it and use 100 GB per month completely free.

Pricing

Deliver fast and efficiently!

Try Gcore Network

Gcore all-in-one platform: cloud, AI, CDN, security, and other infrastructure services.

Related articles

Gcore partners with AVEQ to elevate streaming performance monitoring

At Gcore, delivering exceptional streaming experiences to users across our global network is at the heart of what we do. We're excited to share how we're taking our CDN performance monitoring to new heights through our partnership with AVEQ

How we engineered a single pipeline for LL-HLS and LL-DASH

Viewers in sports, gaming, and interactive events expect real-time, low-latency streaming experiences. To deliver this, the industry has rallied around two powerful protocols: Low-Latency HLS (LL-HLS) and Low-Latency DASH (LL-DASH).While th

Gcore CDN updates: Dedicated IP and BYOIP now available

We’re pleased to announce two new premium features for Gcore CDN: Dedicated IP and Bring Your Own IP (BYOIP). These capabilities give customers more control over their CDN configuration, helping you meet strict security, compliance, and bra

Smart caching and predictive streaming: the next generation of content delivery

As streaming demand surges worldwide, providers face mounting pressure to deliver high-quality video without buffering, lag, or quality dips, no matter where the viewer is or what device they're using. That pressure is only growing as audie

Protecting networks at scale with AI security strategies

Network cyberattacks are no longer isolated incidents. They are a constant, relentless assault on network infrastructure, probing for vulnerabilities in routing, session handling, and authentication flows. With AI at their disposal, threat

Introducing Gcore for Startups: created for builders, by builders

Building a startup is tough. Every decision about your infrastructure can make or break your speed to market and burn rate. Your time, team, and budget are stretched thin. That’s why you need a partner that helps you scale without compromis

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.