Better implementation of MethodAwareCacheKeyGenerator