Caching விலையுயர்ந்த operations-இன் (DB queries, computations, external API calls) முடிவுகளைச் சேமிக்கிறது, இதனால் மீண்டும் வரும் requests வேலையை மீண்டும் செய்யாமல் வேகமாக வழங்கப்படலாம். இது ஒரு API-க்கான மிக அதிக-தாக்க செயல்திறன் optimizations-இல் ஒன்று.
In-memory caching (வேகமானது, single-instance)
cache = ();
() {
(cache.(id)) cache.(id);
user = db.(id);
cache.(id, user);
user;
}
