Skip to main content
Last Reviewed: October 08, 2020

APCu Cache Basics

Understand APCu and its uses within the Pantheon WebOps workflow.

APCu is a user-accessible PHP cache. Pantheon provides APCu by default across all plans, but the size of the APCu memory cache (apc.shm_size) varies depending on the service level. See the Application Containers overview to learn more about APCu on Pantheon's container architecture.

Frequently Asked Questions

Can APCu be used as a cache backend on Pantheon?

Yes, APCu can be used as a cache backend or a "key-value store"; however, this is not recommended. APCu lacks the ability to span multiple application containers. Instead, Pantheon provides a Redis-based Object Cache as a caching backend for Drupal and WordPress, which has coherence across multiple application containers.

How can I determine what my current APCu settings are?

Search for shm_size in phpinfo.

As this is not a runtime configuration, the shm_size cannot be changed. If a greater shm_size is needed, then the two options available are to optimize the codebase to operate within the service level, or to upgrade the site account for a larger shm_size allocation.

Does "Clear Caches" Affect ACPu

No. The Clear Caches button in the Site Dashboard does not interact with APCu. The function apcu_clear_cache will clear the APCu cache for a single application container.

More Resources