Setting $CFG->filelifetime = 0 in config.php has no effect. This is because file.php checks to see if $CFG->filelifetime is empty. In PHP, empty(0) is true, which means your filelifetime is set to 86400, the default.
The workaround is to set $CFG->filelifetime =
1, but I think file.php should check to see if (!isset($CFG>filelifetime)) as per the attached patch. The value would be consistently applied throughout its possible range.