CoreyMSchafer/code_snippets

Heroku Django Blog with S3 AWS Images Not Caching

Opened this issue · 1 comments

Hello. I followed the tutorial and deployed my blog successfully to the Heroku with S3 AWS addition. But whenever I refresh the website profile images get re-downloaded from S3. Is there any specific setting to allow the browsers to cache images from S3? What should I change S3 IAMA settings or my website project settings? The URL for my blog web site is here.

@mrkaragoz you need to make some adjustments to your Django project.

here is the algorithm:

given a URL, try finding that page in the cache
if the page is in the cache:
    return the cached page
else:
    generate the page
    save the generated page in the cache (for next time)
    return the generated page

just follow the steps in the Django documentation click here: caching in django