heroku-python / dj-static

DEPRECATED - use WhiteNoise instead!
http://kennethreitz.org/introducing-dj-static/
BSD 2-Clause "Simplified" License
511 stars 74 forks source link

Cache-Control headers #48

Open ukch opened 8 years ago

ukch commented 8 years ago

I can't see anything in the documentation about whether it's possible to set cache-control headers on the returned files. If such a thing were possible, it would be great!

theskumar commented 8 years ago

I feel this is something that need to be addressed in the static library first before it can be added to dj-static. See https://github.com/lukearno/static/pull/5 for further details.

This would definitely be a nice addition.

@ukch you might want to look into whitenoise library that can handle gzip and cache-control as well.

lukearno commented 8 years ago

It may already do what you want.

https://github.com/lukearno/static/blob/master/static/apps.py#L111

Luke

On Mon, Mar 14, 2016 at 3:44 AM, Saurabh Kumar notifications@github.com wrote:

I feel this is something that need to be addressed in the static library first before it can be added to dj-static. See lukearno/static#5 https://github.com/lukearno/static/pull/5 for further details.

This would definitely be a nice addition.

@ukch https://github.com/ukch you might want to look into whitenoise library that can handle gzip and cache-control as well.

— Reply to this email directly or view it on GitHub https://github.com/kennethreitz/dj-static/issues/48#issuecomment-196250352 .

kennethreitz commented 8 years ago

WhiteNoise does this, FYI.