You also have to consider client side caching, despite if you use the
correct headers or not.

One option is to use a cache buster using a value which changes on each
release, but I'd advise against using random() cache buster as your caching
efficiency will be impacted.

//example.com/static/images.jpg?release=1000
//example.com/static/images.jpg?release=1001

Cal


On Wed, Jul 2, 2014 at 7:08 PM, Chen Xu <xuche...@gmail.com> wrote:

> Hi Everyone,
>
> I am currently using the following strategy to serve my static files,
> basically I run collectstatic to copy all my files to my static files
> directory, and then move it to s3, and cloudfront will pick it up from
> there. However, I wonder if I set the cache period to be 1 day in my
> cloudfront, and I upload new updated files to s3, are the files still going
> to be the old ones until next time the cache expires?
>
>
> Thanks
>
> --
> ⚡ Chen Xu ⚡
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACac-qYBa0Pg0eYQfoVGNTk2jHXC2Y100-xkHAo0AA7%2Bk3cw_w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACac-qYBa0Pg0eYQfoVGNTk2jHXC2Y100-xkHAo0AA7%2Bk3cw_w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHKQagFLDZigvNmwdM_GvHnpamuj4Ro0gvVoNyfUbA_kemXa8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to