Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images charged with 301 and 200 ! #173

Open
claireve opened this issue Feb 9, 2014 · 1 comment
Open

Images charged with 301 and 200 ! #173

claireve opened this issue Feb 9, 2014 · 1 comment

Comments

@claireve
Copy link

claireve commented Feb 9, 2014

Hi everybody,
I have installed Avalanche Imagine Bundle and set up some thumbnails. Everything works fine..except the cache functionality.
Indeed, I want my images to be cached (for example for 2 weeks as in the documentation example). I also changed the config file of Apache as said in the documentation example. But when I go to my webpage in prod with my Avalanche thumbnails (where the cache is enabled) I can see with Firebug that my images are loaded with 301 (fine, that means there in cache) but also with 200. I don't understand what's happening ... and so my website is still slow..

Thank you very much for helping me

Here is my config

avalanche_imagine:
filters:
my_thumb:
type: thumbnail
options: { size: [195, 130], mode: outbound, quality: 100, format: png, cache_type: public, cache_expires: 2 weeks }

@design311
Copy link

According to the documentation:

Cache headers are set only for first request when image is generated.
To solve this issue you should add additional configuration for your web server.
Example for apache web server:

<IfModule mod_expires.c>
    <Directory "/path/to/web/media/cache">
        ExpiresActive On
        ExpiresDefault "access plus 2 weeks"
    </Directory>
</IfModule>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants