if (-s $cache_path) { # is it in the cache? # this would of course be the content read from the cache +file... my $content = "...yadda yadda... +"; # create response my $res = HTTP::Response->new(200); $res->content_type('text/html'); $res->content($content); # send back (short-circuit normal content fetching) $self->proxy()->response($res); }