httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Caching Images
Date Wed, 21 Dec 2005 03:04:09 GMT
On 12/20/05, Michael Avila <> wrote:
> The idea is to have the images be cached (even in memory if possible) so that it is super
fast as I am running this on my PC that I use for other things. And I only have 1 GB of memory.
> It is my understanding from reading posts that mod_cache relies on the expire statement.
Images will not have that so I was wondering how to cache only them. This is a phpBB forum
with oscommerce. Oscommerce more than phpBB has images.

mod_cache will also cache based on Last-Modified headers, which all
static files will have.  But you can also add expires headers with

But really, caching static images in this way is going to save you
very very little.  Assuming your OS has an efficient sendfile syscall,
it will already be implicitly caching and doing zero-copy network
sends on frequently-used files.  Putting mod_cache in front of that
will not make a noticable difference unless you are trying to fill an
extremely big network pipe.

You can also look at mod_file_cache
But you should really test this under load, because depending on the
details of your setup, ordinary sendfile-based serving could be

View raw message