Back to examples

API cache with Query

The same cache as the API cache example, with Foldkit Query handling fetch results, retries, deduplication, and keyed entries. The parent Program handles the user's clicks.

View source

Posts

Open a post, then go back. The list stays Success. reset clears cached post details; late responses for cleared entries are ignored. Open the same post again to load it fresh. The Cached badge uses postDetailQuery.read, which returns the slot's AsyncData.

Loading posts…