Minus Log Of Random
A hot key is written with a 60 second TTL. Readers arrive throughout its life, and the four nearest expiry are marked.
Every reader runs this, where is the measured wall time the last recompute took and rand() draws uniformly from :
function XFetch(key, ttl; beta = 1)
value, delta, expiry <- CacheRead(key)
if !value or Time() - delta * beta * log(rand()) >= expiry then
start <- Time()
value <- RecomputeValue()
delta <- Time() - start
CacheWrite(key, (value, delta), ttl)
end
return value
end
What does the term accomplish?
Sign in to answer questions and track your progress
Sign In