As you know, by default APC caches all files that server once compiled. I've got some question about caching:
- When should I really cache an entire file?
=======
- In the following code can I cache file1.php's opcode?
- Are every opcodes with the same values of variables are the same?
for example in file1.php, it has one variable and its value depends on user.
<?php
//connected to database and fetched the name of the user
$name = 'jack';
?>
Here is file2.php
<?php
include 'file1.php';
echo "hello Mr.".$userName;
?>
opcodeof a script, not the values of runtime variables - Mark Baker