# File sending

The only purpose of the file handler is to send files. No more, no less.

## Parameters

The file handler accepts one parameter:

- IOCache [on | off]: By default it will use an internal I/O cache to improve the server performance. If you don't want to use it with a directory just unset it using this parameter.

## Examples

Let imagine your DocumentRoot points to /var/www.

    Directory /images {
        Handler file
    }

This configuration will make Cherokee to serve files inside /var/www/images like files.

You could also define another DocumentRoot for a certain directory entry.
The next configuration example is very common in Mailman installations:

    Directory /images/mailman {
        Handler file
        DocumentRoot /usr/share/images/mailman/
    }

On http://www.example.com/images/mailman/mailman.jpg request it will send: /usr/share/images/mailman/mailman.jpg

It is a good idea to disable to I/O cache if the content of the directory changes often:

    Directory /webcam {
        Handler file {
            IOCache off
        }
    }