Set cache expiration based on request filename

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/;
}

I think you want to use “location” directive, and an expires inside :wink:


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 C. [email protected] 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/;
}

Boy do I feel foolish. Of course. Thanks!

Sent from my BlackBerry device on the Rogers Wireless Network