The current implementation for HQL interpretation caching does some unnecessary allocations which can be easily fixed by introducing a custom cache key.