Promptles
Architecture

Caching

intermediate

Definition

Saving the result of slow work somewhere fast so the next person who needs it gets it instantly. The first time something is calculated or fetched it's slow; every time after that, the saved copy is handed out until it gets too old to trust.

In the wild

The first visitor to a popular news article triggers the article being pulled from the database. The result is saved in fast memory. The next 10,000 visitors get the saved copy in milliseconds: without bothering the database at all.

More from Architecture