Improve performance of cache key calculations by using fast enumeration and avoiding `[NSString stringWithFormat:]`