Fixed bug on template/other files compilation with opcode cache engines

When there is an opcode cache engine, a 'require' on a fresh generated
php file loads the previous version of the file (since a require has been made
in the same process before). We should invalidate the cache before
requiring the file.