Class CombineUnsupportedMemo
java.lang.Object
org.frontcache.include.combine.CombineUnsupportedMemo
Remembers, per batch group, that the origin does not implement combining.
See docs/archive/combine-reduce-proposal.md section 9.1.
Without it, an origin that has the
combine attribute in its markup but not the handler
behind it pays one wasted request per group on every single page view, forever. With it, that
cost is one probe per group per TTL, and a rolling origin deploy converges within one TTL rather
than staying degraded until someone notices.
Why a TTL and not a permanent flag
The answer changes. An origin gains combine support mid-deploy, and half the fleet answers one way while the other half answers the other. A permanent flag would pin the edge to whichever node it happened to ask first.Bounding it
The key space is endpoints named in the origin's own markup, so it is small and not attacker-chosen - but it is written from include threads and never otherwise read, so an entry for a group that stops appearing would live forever.mark(String, long) sweeps expired entries once
the map grows past SWEEP_THRESHOLD, which is cheap because the sweep only ever runs on
the already-slow unsupported path.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Forget everything - for tests, and for a config reload that changes the TTL.booleanisUnsupported(String groupKey) Is combining known to be unsupported for this group right now?voidRecord that this group's origin did not understand a combined request.intsize()
-
Constructor Details
-
CombineUnsupportedMemo
public CombineUnsupportedMemo()
-
-
Method Details
-
isUnsupported
Is combining known to be unsupported for this group right now? -
mark
Record that this group's origin did not understand a combined request. -
clear
public void clear()Forget everything - for tests, and for a config reload that changes the TTL. -
size
public int size()
-