Set cache expiration based on request filename

Micah Carrick micah at
Sat Mar 31 15:52:09 UTC 2012

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;
    expires     max;
    add_header  Cache-Control public;
    access_log  off;
    root        /home/username/public_html/;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list