PHP: APC Configuration and Usage Tips and Tricks Part 3

This PHP APC guide is divided on four different section:
1. PHP APC Configuration
2. Enable PHP APC Statistics
3. Howto Use PHP APC User Cache
4. PHP APC Performance Testing

3. Howto Use PHP APC User Cache Examples

3.1 PHP APC User Cache Example with Numeric Values

Here is an example howto use apc_add, apc_cas, apc_fetch, apc_dec and apc_inc:

Output:

3.2 PHP APC User Cache Example with String

This example shows howto use apc_fetch, apc_exists, apc_store, apc_clear_cache:

First run output:

Second run output:

3.3 PHP APC User Cache Example with Array

First run output:

Second run output:

3.3 PHP APC User Cache Example with Object

First run output:

Second run output:

This PHP APC guide is divided on four different section:
1. PHP APC Configuration
2. Enable PHP APC Statistics
3. Howto Use PHP APC User Cache
4. PHP APC Performance Testing

Share this post

38 Comments

  1. thank you so much, this has been a big help!!!!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *