Storage Connections

MilliCache supports high-availability storage out of the box: a single server, a master/replica replication set, or a Sentinel-managed cluster (see Storage Backends in the MilliCache docs). Without Pro, replication and Sentinel are configured through the MC_STORAGE_HOST constant in wp-config.php.

MilliCache Pro upgrades the Storage Server section of the settings screen with a visual connection editor, so all three topologies can be configured from the UI.

Connection Modes#Copied!

The Connection field offers three modes:

Single Server#Copied!

One host and port (or a Unix socket path, or a tls:// host for encrypted connections). This is MilliCache's default configuration.

Replication#Copied!

A master node plus any number of replicas. MilliCache writes to the master and can distribute reads across replicas. Add replica rows as needed.

Sentinel#Copied!

A service name (the Sentinel master group name, e.g. mymaster) plus the list of Sentinel nodes (default port 26379). Sentinel discovers the current master automatically, so failovers are handled without touching your WordPress configuration.

Switching between modes keeps the first host you entered, so trying a topology is non-destructive.

Shared Connection Settings#Copied!

The username, password, and database below the connection field apply to every node of the configured topology:

Setting Default Description
Username empty ACL username, if your server uses named users
Password empty Stored encrypted
Database ID 0 Database number within the server (typically 0-15)
Key Prefix auto-generated Namespaces every cache key this site writes; only change it to pin a specific namespace when several installs share one server
Persistent Storage Connection on Reuse the connection between requests instead of reconnecting each time

Constants Still Win#Copied!

If MC_STORAGE_HOST is defined in wp-config.php, the connection editor shows the pinned value read-only ("Defined by the MC_STORAGE_HOST constant in wp-config.php."). Constants take precedence over UI settings, exactly as in MilliCache itself; the constants reference documents the array shapes for replication and Sentinel.

Notes#Copied!

  • A full settings reset preserves the storage connection, so resetting your caching behavior never disconnects your cache server.
  • The Object Cache drop-in rides the same connection automatically, including replication and Sentinel setups.

Next Steps#Copied!

Last updated: