How does caching work?

If you change something in Aiir, you might not see that change take effect on a page on your website immediately. Why is that?

We utilise something called "caching". This is where a page or file on the web is stored somewhere, to make it quicker for you to open.

If we didn't use caching, you might always see the current version of something, but things would be slower to load and a lot more expensive for us to run.

Caching is used throughout the internet, to make it quicker for end users, reduce unnecessary traffic, and in turn reduce the burden on the servers that make everything work.

There are two types of caching we (and the rest of the internet) use:

1. Caching in your web browser

When you visit a website in your browser, elements of the page can be stored on your computer or device, so that when you next open that same page or file, you already have a copy, so it doesn't need to be transferred to you again.

As the web host, we're able to set how long each page or file is stored in your browser for. 

This is useful, because it can be set according to how often it is likely to change.

If a file is never going to change, it can be stored for longer. There's no point grabbing a fresh copy of something that hasn't changed (and is never going to) if you already have a copy.

For example - all the files you upload to Media Manager in Aiir - we set those to cache for a very long time. You can't edit a file you have uploaded (only delete or replace), so we can set them to cache for a very long time, which saves lots of data having to be downloaded to the browser of each visitor while they browse your website.

On the other hand, the homepage of your website for example, could potentially change a lot! For something like that, we can tell your browser to only store it for say, 30 seconds. That ensures if they refresh it, they'll regularly see fresh information.

2. Caching in the cloud

We utilise something called a "Content Delivery Network" at Aiir, or CDN for short. Essentially, it's a bunch of computers (servers) spread across the world, storing copies of the pages and files on our websites.

When you visit a website in your browser, it cleverly contacts one of the servers in the CDN which is geographically closest to you. 

That server checks if it's holding a copy of the page or file you're asking for. If it's got one, it returns it to you! Job done.

If it doesn't have a copy, it contacts our central servers which are located in Ireland. Our servers there (hosted by AWS) put together the webpage or dig out the file you're asking for, and return it to the CDN.

The CDN returns the file or page to you, and also stores a copy, for the next person who wants one.

It's much quicker for the server in the CDN which is closest to you to provide you with a copy if there is one, than having to go ask the central server. It's cheaper than the central server having to do everything too. So you can see how a CDN makes things much more efficient.

--

It's for these reasons, that a page might not always update immediately when you make a change. If this happens, it's probably cached for a short while, either in your browser, or in the cloud. 

We carefully consider how long each page should be cached for, to try and maintain an optimum experience and balance.

Still need help? Contact Us Contact Us