{"version":"1.0","type":"rich","title":"Demo of my strange caching strategy","description":"This example demonstrates a caching strategy that stores promises instead of resolved data, ensuring that repeated requests for the same resource return the same in-flight promise. The code uses jQuery’s `ajax` method wrapped in a native `Promise` to fetch Star Wars character data from the SWAPI, with a `Cache` class exposing getters for Luke Skywalker and his homeworld, Tatooine. The getter for Tatooine chains off the Luke promise, and the demo logs responses from both cached entries, showing how dependent promises are reused without duplicate network calls.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-0dc0fa0b7d6f0ada9154f3486675028a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}