Media storage and caching
Jamroom Developers
Yes, all CDN's work that way.
1. The cdn grabs content from the origin, wheather S3 or anywhere else, through a reverse proxy.
So any object you want delivered through the cdn you deliver through different host.
for example.
i create host cdn.mysite.com. IN the cdn control panel, you define your origin as www.mysite.com.
Now lets say you have an image on the site, such as logo. You would make the request for loge
http://cdn.mysite.com/skin/elastic/logo.jpg.
The logo would be deliverred by the CDN. The FIRST time the request is made for the object, it is not on the CDN. So the CDN will redirect the client to
http://www.mysite.com/skin/elastic/logo.jpg . HOwever, now the cdn has the object and can deliver it for future requests as long as it remains on the cdn network somewhere. This leads to the second question :refresh.
This works the same way it does on the local cache. There are a number of things to do.
1. You can define the TTL of your objects in the CDN control panel. You can create rules for different object types and directories.
2. All CDN's allow you to do a cache flush and immediately expire all your content so that the cdn must re-fetch all the content. This can be done in the console. However, most also have API's that allow you to trigger the flush from the app. In our case you could add a web hook that triggers a flush on CDN whenever you flush cache in JR.
I've been doing this for 14 years. It really is very easy and most of my cdn customers implement it in under an hour.
That being said, can you give an ETA on the S3 module?