Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Why cant we include the master.php instead of file_get_contents for OPCACHE ? #583

Open
AltamashShaikh opened this issue Nov 8, 2018 · 0 comments

Comments

@AltamashShaikh
Copy link

Currently the Config.php is doing file_get_contents, we can instead use include/require this will opcache the master.php file which is being called so frequently.

For this we have to change the ConfigUtil.php
Util_File::file_put_contents_atomic( $filename, '' . $config );

and in Config.php

$data = include($filename);
return $data;

instead of
$content = @file_get_contents( $filename );
$config = @json_decode( substr( $content, 14 ), true );

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant