Simon Willison’s Weblog

Subscribe

Friday, 22nd July 2022

Promise Maps. Egbert Teeselink describes a neat JavaScript caching pattern: instead of caching key:value cache key:promise-that-resolves-to-value—doing this gives you dog piling prevention for free, because the first lookup of a value trigers the computation to fetch it while subsequent lookups wait on the same promise to resolve—or resolve instantly if the computation has completed.

# 3:52 pm / dogpile, javascript

Release datasette-insert 0.8 — Datasette plugin for inserting and updating data
Wednesday, 20th July 2022
Saturday, 23rd July 2022