• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bleedingdeacons / unity / 35297410166
96%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 02:00AM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Sep 2026 01:57AM UTC coverage: 95.47% (+1.8%) from 93.678%
35297410166

push

github

web-flow
feat: cache members behind a repository decorator (#70)

Members are read constantly and written rarely, and building one costs
around twenty-five get_field() calls through ACF. CachingMemberRepository
wraps any MemberRepository and holds the finished objects, so that work
happens once per member per write rather than once per request.

Invalidation is a version counter rather than per-key deletes: a write
bumps the version and every key moves with it. Memcached drop-ins
generally do not implement wp_cache_flush_group(), and wp_cache_flush()
would clear the whole shared cache — every other plugin's entries, and on
a host where two installs share an instance, the other site's too.

MemberCacheInvalidator is the other half, and the decorator is not safe
without it: the ACF admin screen, Reconcile and Scrutiny's pruner all
write members without going through the repository. It hooks WordPress's
own post and meta actions, which also puts the clear before
TsmlMemberChangeTracker re-reads a member mid-save — clearing on
unity/member_changed instead would be too late, and the tracker would
compare a snapshot against a cached copy of itself, find nothing changed,
and Scrutiny would never record the edit.

Two details that are load-bearing rather than tidy:

- An evicted version regenerates to a value never used before, not to a
  fixed starting point. Resetting to "1" would bring pre-bump entries
  back into reach — stale members returning because the cache filled up.
- Entries expire after twelve hours even when nothing clears them.
  Members carry personal data, and an entry that never expires is one a
  GDPR erasure can miss for as long as the cache holds it.

Nothing is wired up yet: tsml-for-unity registers the repositories and
does the wrapping, in its own PR.

274 of 287 relevant lines covered (95.47%)

4.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 35297410166.1 18 Sep 2026 02:00AM UTC 12
95.47
GitHub Action Run
Source Files on build 35297410166
  • Tree
  • List 12
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35297410166
  • fdec4713 on github
  • Prev Build on main (#34259131029)
  • Next Build on main (#35298547377)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc