wp-content/plugins/xebec/xebec.php
Xebec
Cache REST responses, and invalidate them correctly, which is the hard half.
== Description ==
A headless front end hits the REST API hundreds of times a minute for content that changes weekly. Xebec caches responses and — the part that makes it usable — tracks which posts and terms each response touched, so publishing invalidates exactly the responses affected.
Authenticated requests are never cached unless a route explicitly opts in, because a cached authenticated response served to the wrong user is the worst bug in this category.
The report shows hit rate and mean saved time per route, which is how you find out that one collection endpoint is 90% of your traffic and has a 4% hit rate because of a cache-busting query parameter.
== Screenshots ==
Numbered the way they ship in /assets/. Click any one to see it full width.
== Installation ==
- Install and activate the plugin.
- Enable caching for the routes you want under Tools → REST Cache.
- Read the hit-rate report after a day.
Nothing is cached until you enable a route. There is no default-on behaviour.
== Frequently asked questions ==
Authenticated requests?
Not cached unless a route opts in explicitly, and the setting explains the risk.
Does it need Redis?
It uses the object cache if one is present and a database table otherwise. Both work; one is faster.
== Changelog ==
= 1.6.0 =
- Dependency tracking, so publishing a post invalidates only the responses that included it.
- Per-route hit-rate report.
= 1.3.0 =
- Authenticated requests excluded by default.