I am using nginx as proxy before apache a long time already. And it is
really terrific what it does.
Ram usage dropped like 3 times
I mainly set up image cache headers in nginx config
Today I’ve spotted, that one of vhosts is generating images ALWAYS on
the
fly, images are accessed like:
/bin/825?w=121&h=87&cutted=fit
/bin/4999?w=222
/bin/5113?w=121&h=87&cutted=fit
etc…
I wonder is there any way I can tell nginx to store those images
locally,
ie for a week, and serve them
to other users, so it won’t be resized multiple times?
I tried googling but don’t even know how/where to start from…
One more question is left in my mind, I see the expire headers are set,
but
the HTTP response status is always 200.
is there somewhere a way to make it respond with status 304 (not
modified)
?
I wonder is there any way I can tell nginx to store those images locally, ie for
a week, and serve them
to other users, so it won’t be resized multiple times?
I tried googling but don’t even know how/where to start from…
One more question is left in my mind, I see the expire headers are set, but the
HTTP response status is always 200.
is there somewhere a way to make it respond with status 304 (not modified) ?
Do these images have “Last-Modified” or “ETag” header field ?