A cache you own
Every cache belongs to the key that created it. Decisions you have already paid for are read back by your own application, never recomputed and never exposed to another caller.
Store each decision in a cache you own, then resolve it back with a query: exact values in where, closest values ranked by near, and a threshold that decides how far is close enough. When nothing stored answers, ask for it to be predicted.
4query clauses
0 – 1nearness scale
HIT / MISSon every read
A REAL RESOLVE CALL
POST /caches/:cacheId/resolve
REQUEST
{
"select": {
"pair": true,
"timeframe": true,
"decision": { "predict": true }
},
"where": {
"pair": "BTCUSDT",
"timeframe": "1m"
},
"orderBy": {
"near": { "adx": 24, "atr": 0.003 },
"nearThreshold": 0.5
},
"limit": 5
}RESPONSEHIT
{
"records": [
{
"itemPublicId": "itm_7fq2x1",
"matchType": "nearest",
"fields": {
"pair": "BTCUSDT",
"timeframe": "1m"
},
"result": { "decision": "hold" }
}
],
"outcome": "HIT"
}nearThreshold sets how far is close enough, so a query can still miss. Add a predict entry and a trained predictive engine supplies the missing field.
Nearest stored match returned
WHAT A CACHE IS
Every cache holds its items, one optional input schema, and one active versioned matching policy. The policy is what turns a new question into a stored answer.
CREATESTORERESOLVEPREDICT
Every cache belongs to the key that created it. Decisions you have already paid for are read back by your own application, never recomputed and never exposed to another caller.
Build purpose-built memory for sensitive decisions and keep ownership, access and lifecycle under your control. Parent caches are never searched behind your back.
Give a cache a schema and every input is checked against one shape before it is stored. A cache without one still accepts anything its matching policy permits.
Each cache holds one active, versioned matching policy. It decides which fields must agree exactly and which are ranked by nearness, and it adapts as your stored decisions accumulate.
HOW IT WORKS / 03 STEPS
01
One cache, one set of stored answers, one policy for what counts as the same question. Constrain it to a schema when your inputs share a shape.
02
Write each decision as a cache item with the input that produced it, so a later read knows exactly what it is matching against.
03
Name exact fields in where, rank the rest by near, and set nearThreshold. Ask for a predicted field and a trained predictive engine fills the gap when nothing stored answers.
CACHE HIT // INCOMING
The next useful decision may already be stored. Create a cache, and turn every answer into a read instead of a fresh run.