tags:

views:

61

answers:

1

When we include($file) ,caching is done internally,automatically.

How to achieve that?

+2  A: 

Your question is nonsensical when combined with your comment. Caching of bytecode and being able to cache a variable value are two entirely unrelated things.

apc_store is used to store a variable in the shared cache. It has nothing to do with file includes.

APC also caches PHP bytecode. It does so automatically unless the apc.cache_by_default configuration directive is turned off and filters are used as described on the manual page.

You can see if APC is enabled in general by checking the value of the apc.enabled configuration directive.

You can not have APC automatically cache a variable.

Charles
Why do you say caching `bytecode` and `variable` are entirely unrelated?
wamp
Bytecode caching is not the same thing as variable caching. They are different things done in different ways for different reasons. Maybe I don't understand what you're asking, can you ask it in a different way?
Charles