As of lighttpd 1.4.24, mod_magnet is not required to check whether a file exists. ImageCache and clean URL's now work with rewrite rules alone. Using mod_rewrite is less memory intensive and complicated than using mod_magnet with the LUA script linked on the module homepage.
All you need is:
url.rewrite-if-not-file = ( "^/(.*)$" => "/index.php?q=$1" )
This rule goes before your other rewrite rules.
Thought you might want to update the module homepage so people don't think they have to use mod_magnet to use Clean URL's and ImageCache.