Skip to content

v0.2.0

Choose a tag to compare

@ogorzalka ogorzalka released this 23 Nov 15:05
· 43 commits to main since this release
942c330

An opt-in prefetch: the pages of one kind of the front remember the keys they read, and the next one loads them with a single call to Redis instead of one per key.

  • Off by default (prefetch.enabled); bounded (prefetch.max_keys, prefetch.ttl); flushed with the site; never loaded for non-persistent groups or prefetch.exclude_groups (userlogins by default).
  • Console, administration, AJAX, REST, cron and non-GET requests take no part.
  • A value holding an object whose class is not loaded yet is left out and read normally later.
  • On a development site with WooCommerce, Redis commands per request went from about 230 to 100-134 (home), 203 to 126 (shop), 168 to 52 (product). A cart and a Store API checkout gave the same results with and without it.

The README describes it: https://github.com/Pollora/object-cache#prefetch. It has not run in production yet and the API may change before 1.0: pin the version.