(version >= 0 && cached.getStoredVersion() == version))
{
// now also make sure that the underlying data has not changed.
// This may look a bit superfluous, but the repository may not provide
// sensible cacheable information.
final ResourceDataCacheEntry bundleRawDataCacheEntry = getDataCache().get(data.getBundleKey());
if (bundleRawDataCacheEntry != null)
{
final ResourceData bundleRawData = bundleRawDataCacheEntry.getData();
if (bundleRawData != null)
{
if (isValidData(bundleRawDataCacheEntry, bundleRawData))
{
return data;