2

apc_clear_cache has an option to send in 'user' which will delete the apc user cache, or else if not present, the system cache.

I don't understand the difference since there's no way to explicitly store a value in one cache over the other via apc_store/apc_fetch.

1 Answer 1

6

They are different caches. One is not better than others. You can find about The system cache consists of cached files (PHP bytecode cache). For instance this call will create system cache:

$file = "foobar.php";
apc_compile_file($file);

On the other hand, the user cache is program data

$silly_text = "Lorem ipsum dolor sit amet";
apc_store("silly", $silly_text);

In some cases, it may be time consuming to call apc_clear_cache and you may be better off restarting the server instead of clearing the cache.

Sign up to request clarification or add additional context in comments.

2 Comments

so is that to say system cache is about bytecode caching, where as user cache is about value/data caching/storage?
Yes. I have hyper linked system cache to phpbuilder.com/manual/en/function.apc-cache-info.php URL which also mentions system cache consists of cached files. In general you should think of this as the area used by system level components like APC and PHP runtime.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.