Tag: caching
All the articles with the tag "caching".
Cache the prompt, not the inputs
2 min readAn LLM cache keyed on a hand-picked list of inputs fell behind the prompt it protected. Hashing the rendered prompt fixed it, and the choice of hash turned out to be a security decision.
We moved our page cache to R2, then deleted it
4 min readR2 charges 12.5 times more for a write than a read. Rendered HTML that revalidates on a timer is the worst workload for that pricing, and images are the best.
Your error handler is inside the cache
3 min readA thirty-second backend restart became an hour of 404s, because a try/catch inside a "use cache" function cached the failure as a value.