wamp
wamp

Reputation: 5969

How to configure PHP apc so that caching is done automatically?

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

How to achieve that?

Upvotes: 0

Views: 1466

Answers (1)

Charles
Charles

Reputation: 51421

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.

Upvotes: 5

Related Questions