CE-248 Caching function used multiple times