qaware / collection-cacheable-for-spring

Spring cache extension for putting a whole collection of entities as single cache items
Apache License 2.0
60 stars 9 forks source link

putUncachedResultToCache is actually putting all items to cache. #45

Open jackmiking opened 1 year ago

jackmiking commented 1 year ago

version 1.3.0.in CollectionCacheableCacheInterceptor line 89

 ReturnValueConverter.MapLikeReturnValue returnValue = operation.getReturnValueConverter().convert(uncachedResult, cacheResult);
        if (context.canPutToCache(uncachedResult)) {
            putUncachedResultToCache(returnValue, context);
            if (operation.isPutNull()) {
                putNullToCache(returnValue, idsArgument, context);
            }
        }

putUncachedResultToCache(returnValue, context); this line. should use uncachedResult value instead of returnValue.