Set cache expiration based on request filename

Adnan RIHAN axel50397 at gmail.com
Sat Mar 31 15:56:27 UTC 2012


I think you want to use "location" directive, and an expires inside ;)

--
Cordialement, Adnan RIHAN.
Président-Fondateur de l'association Virtual-Info (Loi 1901),
hébergement Web et Serveurs de jeux.
Technicien-Supérieur développeur d'applications Web et Système.
3e année à {Epitech}.
Envoyé de mon iPhone 

Le 31 mars 2012 à 17:52, Micah Carrick <micah at quixotix.com> a écrit :

Hey folks,

My Django website uses a subdomain to serve static content and as such I
have 'expires' set to max. However, there is now one image on that domain
that get's re-generated every 10 minutes. How would I go about forcing just
that one filename to NOT be cached by the browser?

This is what I have:

server {
    listen      80;
    listen      443;
    ssl         on;
    server_name static.example.com;
    expires     max;
    add_header  Cache-Control public;
    access_log  off;
    root        /home/username/public_html/static.example.com/;
}

_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120331/2fc98f07/attachment.html>


More information about the nginx mailing list