Caching of runtime mappings

Does anyone know when the results of runtime mappings are cached?

I've seen instances where my first run takes 10s of seconds, but my second is near instant - so they are clearly being cached sometimes.

But then I do what I think is the same thing elsewhere, and it's the same 10s of seconds every time.

Is there anything predictable about this caching?