make lighttpd serve unreachable files out of cache

Skip to first unread message


Mar 17, 2011, 12:01:00 PM3/17/11
to mod_cache

we are using mod_memcache in 10GB RAM and an expire-time of 360
minutes with >800 req/sec on static files that are hosted an a shared
storage. For fallback purposes (upgrading storage-system with
downtime) we thought, that lighttpd + mod_mem_cache would serve files,
that are already lying in his memcache but are temporarily not
available through nfs.
But lighttpd/mod_memcache are checking existence of the file to serve
nevertheless and send a 404.

On the other side, our static files are _really_ static, meaning, that
a file, once it exists through nfs, will we available forever (at
least more than 360 minutes) and therefor does not have to be checked
for existence on filesystem. Thats a lot of completely unnessecery IO!

So. Can I somehow prevent lighttpd from always checking existence of a
file on the filesystem?

Any ideas how to get that kind of feature working?

kind regards,


Mar 18, 2011, 7:24:28 PM3/18/11
mod_mem_cache caches local static files into memory, so it returns 404 for files that don't exists.

it's better to use mod_cache to cache remote files into memory. add 'use-memory' option to cache.refresh-patterm for these url which needs to save in memory.

full modcache doc locates at
Reply all
Reply to author
0 new messages