DEV Community

Cover image for 3,000 WordPress Sites Use atec Cache APCu — And That Number Means More Than It Looks
Christian Ahrweiler
Christian Ahrweiler

Posted on Originally published at Medium

3,000 WordPress Sites Use atec Cache APCu — And That Number Means More Than It Looks

3,000 WordPress Sites Use atec Cache APCu — And That Number Means More Than It Looks### Why the fastest object cache is not available on every server

More than 3,000 WordPress installations are currently using atec Cache APCu.

Compared with plugins that report hundreds of thousands or even millions of installations, 3,000 may not sound remarkable. But APCu is not available on every WordPress server — and there is a reason for that.

APCu uses real server memory.

That memory is fast, limited, and valuable.

An object cache must be fast

WordPress performs many repetitive operations while generating a page. It loads settings, retrieves database results, builds objects, and requests the same information multiple times.

The WordPress object cache prevents some of this work from being repeated. By default, however, that cache exists only for the duration of the current request. A persistent object cache keeps selected data available for later requests as well. WordPress explains this distinction in its object-cache documentation.

But persistence alone does not guarantee better performance.

Every cache operation introduces work:

  • Create a cache key.
  • Send or write the value to the cache.
  • Retrieve it during a later request.
  • Decode or unserialize it.
  • Validate and eventually remove it. If accessing the cache takes almost as long as regenerating the data — or longer — the cache has missed its purpose.

WordPress states the essential requirement clearly: a cache engine should make accessing data faster than regenerating it. That sounds obvious, but it is frequently overlooked.

A persistent object cache is not automatically a fast object cache.

Why APCu is different

APCu is an in-memory key-value store built directly for PHP. It stores PHP variables in local memory and makes them available to subsequent PHP requests. That is its complete job.

There is no separate database file.

There is no external cache server.

There is no network connection between PHP and the cache.

On a suitable single-server WordPress setup, PHP can access APCu’s shared memory directly. This extremely short path is why APCu can outperform more complex cache backends in low-latency object-cache workloads.

Redis and Memcached are excellent technologies. They are especially useful when cached data must be shared between multiple application servers. But they are separate services, which means additional communication and processing.

SQLite and file-based caches avoid a separate service, but they still involve storage-engine or filesystem work.

For a single web server, those capabilities may add overhead without adding value.

APCu keeps the path deliberately short:

WordPress → PHP → shared memory

For an object cache that may perform hundreds or thousands of small operations during page generation, every layer matters.

The cost of speed

APCu itself is open source. The expensive part is the resource it uses: server memory.

Hosting providers must reserve RAM for PHP workers, the database, the operating system, OPcache, web services, and every hosted customer. Enabling another shared-memory cache reduces the memory available elsewhere.

APCu also requires server-level configuration. The PHP extension must be installed and enabled, and its shared-memory allocation must be appropriate for the workload. The PHP manual documents this through settings such as apc.shm_size. APCu is therefore a hosting feature, not something an ordinary WordPress plugin can provide by itself.

This is why APCu is common on:

  • VPS servers
  • Dedicated servers
  • Managed servers with APCu support
  • Hosting environments where PHP configuration is under the administrator’s control It is less common on inexpensive shared hosting, where memory is tightly divided between many customers.

The limited availability makes 3,000 active installations more meaningful. These are not simply 3,000 WordPress users who clicked Install. They represent thousands of compatible server environments where APCu is enabled and available to WordPress.

When persistent caching makes a site slower

Redis, Memcached, SQLite, and file-based object caches can all improve WordPress performance when they are deployed appropriately.

They can also make a site slower.

This can happen when:

  • the cache service has noticeable latency;
  • the server is already resource-constrained;
  • values are expensive to serialize and transfer;
  • the cache hit rate is too low;
  • the database was already faster for the affected operations;
  • the cache backend is located across a network;
  • a file or SQLite cache introduces additional I/O and locking;
  • the cache is installed simply because Site Health recommended one. The label “persistent object cache” says where data survives. It says nothing about how quickly that data can be retrieved.

Performance must be measured before and after enabling the cache. If the persistent layer adds more overhead than it removes, running without it can be faster.

Built specifically for APCu

atec Cache APCu provides a WordPress object-cache drop-in built entirely around APCu.

It does not add Redis, Memcached, SQLite, or a fallback file cache. If APCu is available, the plugin uses it directly. If APCu is not available, the server is not compatible with this particular caching approach.

The plugin includes:

  • A persistent APCu object cache
  • An optional APCu full-page cache
  • Cache information and usage statistics
  • Group inspection
  • Profiler and debugging tools
  • Cache flushing and automatic purging
  • Advanced object-cache optimizations Its Advanced Object Cache mode can store supported PHP values in a way that avoids unnecessary serialization and unserialization cycles. That matters because reducing cache-processing overhead is just as important as selecting fast storage.

The goal is not to offer every possible cache backend.

The goal is to make the fastest possible use of APCu when the server supports it.

The right cache for the right architecture

APCu is not the universal answer for every WordPress installation.

A multi-server cluster normally needs a shared cache such as Redis or Memcached because each application server must see the same cached data. APCu is local to the server and is therefore best suited to a single-server architecture.

But most WordPress sites are not multi-server clusters.

They run on one VPS, one dedicated machine, or one managed web server. In that environment, using a network-capable cache system may solve a scaling problem the website does not have.

For these sites, local shared memory is difficult to beat.

No additional daemon.
No database file.
No network round trip.
No unnecessary layer between PHP and the cached value.

3,000 installations — and growing

atec Cache APCu currently reports more than 3,000 active installations and a 4.9 out of 5 rating in the official WordPress plugin directory.

That is not a mass-market number.

It is a specialized number for a plugin that requires a specialized — and deliberately fast — server capability.

APCu costs memory. It requires the right hosting environment. It is not designed to distribute cached data across a cluster.

But when WordPress runs on a single server and APCu is available, it offers exactly what an object cache needs most:

Extremely fast access to memory.

Learn more about atec Cache APCu and the complete plugin collection at atecPlugins.

Top comments (0)