Generic memoize function in Swift
It sounds like you're on the right track, but the cache key needn't be so specific. Unless you're storing to the same cache/dictionary as other code is using, there won't be collisions.
Since Fibonacci numbers build on the previous 2 numbers, recursion is a natural solution, but obviously gets slower for larger numbers. This post details a recursive memoization approach that seems like exactly what you're looking for:
https://www.hackingwithswift.com/plus/high-performance-apps/using-memoization-to-speed-up-slow-functions