php - How to set Cache control for external cloud files -


Hey people, I was tilted to improve the motion factors of my page and yesterday I found some cloud space on the Rexspace cloud.

Now before that I was serving static content through cookies using the proper cache control via HTACAC from the cookie domain.

Now when I go to the cloud on my HTACU, the cloud does not control the files. There is a TTL parameter on the rackspace that sets the value for how long the CDN should stay, this value reflects on my page speed setting (google + firebug). Now the default setting can do me maximum 72 hours but I need more than 7 days. I need some API for this and its complex complexity ..

Is there any way that I can do it on my cloud files Can I Apply Cash Control? Do these query strings domain.com/file.css?cache=0.54454334 ???

Do they get what I see? Any help is appreciated.

You can apply it already, but you can see a link to checkout:.

She is using, and so I am also. For anyone you want to do, you can manually set the TTL (aka expired) header. Right now I have set them up for 365 days (possibly a little too high).

This document is quite simple. If you need any help, this code can help you get started:

  & lt ;? APIs in php // are required ('cloudfiles.php'); // cloud information $ username = "myusername"; // username $ key = "c2dfa30bf91f345cf01cb26d8d5ea821"; // api key // rackspace $ auth = connect to new CF_Authentication ($ user name, $ key); $ Auth-> Certified (); $ Conn = New CF_Connection ($ auth); // Get Container We $ Container = $ conn- & gt; Create_container ('picture'); // Store file information $ filename = "images / logo.jpg"; // upload file rackspace $ object = $ container-> Create_object ($ filename); $ Item & gt; Load_from_filename ($ localfile); // Make public and set header $ container- gt; Make_public (86400 * 365); // Set the headers set for 365 days? & Gt;  

Comments