=== Better Memory Cache by Quintaphon ===
Contributors: quintaphon
Tags: redis, object cache, cache, performance, woocommerce
Requires at least: 6.1
Tested up to: 7.2
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A fast, safe object cache on Redis: compression, binary serialization, atomic flushing, race protection, WooCommerce tuning and live analytics.

== Description ==

Better Memory Cache keeps the WordPress object cache in Redis, so pages need far fewer database queries. It works with the Redis your host already gives you: no extra service, no account, nothing to sign up for.

= Performance =

* Data compression: Zstandard, LZ4, LZF or Gzip, for values above a size you choose.
* Binary serialization with igbinary or MessagePack.
* Batch reads and writes: get_multiple, set_multiple and delete_multiple in one round trip.
* Atomic group flushing: one group goes in a single step inside Redis, so WooCommerce and other plugins can clear their caches cleanly.
* Asynchronous flushing with UNLINK and FLUSHDB ASYNC: Redis never pauses for a flush.

= Reliability =

* Race condition protection: autoloaded options are stored one by one and only changes are written, so two requests can never undo each other's option update.
* Atomic counters that follow WordPress rules (incr and decr never go below 0).
* Safe mode: when Redis is down the site keeps working, a short pause stops every request from waiting for it, and the cache is flushed when Redis comes back if writes were lost.
* Site Health checks: memory limit, eviction policy, latency, missing extensions and more.
* A test suite that runs against a real Redis with every client.

= Compatibility =

* PhpRedis, Relay and a built-in client in plain PHP for hosts without an extension.
* WooCommerce optimized.
* Batcache and other page caches that start the object cache early.
* Multisite: one cache for the network, with per-site keys and global groups.
* Reads the WP_REDIS_* constants many hosts already set.

= Features =

* Dashboard with hit ratio, Redis time per request, memory and keys of the last hour.
* An Object Cache menu in the toolbar, in the admin and on the site: a status dot, the hit ratio, hits and misses and Redis calls of the page you are on, and a flush that works without leaving the page.
* Secure connections: TLS with certificate checks, Redis 6 ACL user names, unix sockets.
* Highly customizable: every setting on screen or in wp-config.php.
* Logging to the PHP error log, with the newest lines on screen.
* Diagnostics report, settings export and import.

= Integrations =

* WP-CLI: wp bmc status, enable, disable, flush and health.
* Query Monitor panel.
* Site Health.

= Pro =

Better Memory Cache Pro (from $1 a month, billed yearly, with plans for 1, 3, 10 or unlimited sites and lifetime plans) adds batch prefetching, cache priming, analytics over 30 days and per group, a key browser, time limits per group, Redis Cluster, Sentinel and replication, a REST API, New Relic and OpenTelemetry, more WP-CLI commands, a log file, email alerts and a network overview for multisite.

== Installation ==

1. Install and activate the plugin.
2. Open Object Cache in the admin menu. Enter the Redis address if it is not 127.0.0.1:6379, and click Test connection.
3. Click Turn on the cache.

== Frequently Asked Questions ==

= Do I need a Redis server? =

Yes. Better Memory Cache is the WordPress side. Most hosts offer Redis in their control panel; on your own server, install the redis-server package.

= Does it send my data anywhere? =

No. The free plugin talks only to your Redis server.

= Can several sites share one Redis? =

Yes. Every site gets its own key prefix, and flushing removes only that site's keys.

== Changelog ==

= 1.0.0 =
* First release.
