A cache store: memory (the default, like $cache), file, which keeps values in files in the app's cache folder so they last between runs, or database, which keeps them in the kscript_cache table of the project's database so every server shares them. A name keeps a store's keys apart from other stores'.
A rate limit for anything, not just routes: at most limit attempts per key in each window of per, such as 5 password resets an hour per email. The attempts are counted in a cache store: the app's memory cache by default, or the store given (@cache(file), or a shared store when several servers must count together).
The app's cache in memory: $cache->remember('repos', fn() => @get_json($url), ttl: 10m). It lasts while kscript runs, so in kscript serve it is shared by every request. @cache(file) keeps values between runs.