String id = stylesheet.getSystemId();
Object[] templateAndTimeAndIncludes = (Object[])store.get(id);
if (templateAndTimeAndIncludes != null && templateAndTimeAndIncludes[2] != null) {
// Create aggregated validity
List includes = (List)templateAndTimeAndIncludes[2];
AggregatedCacheValidity validity = new AggregatedCacheValidity();
validity.add(new TimeStampCacheValidity(stylesheet.getLastModified()));
for (int i = includes.size() - 1; i >= 0; i--) {
Object[] pair = (Object[])includes.get(i);
long time = ((Long)pair[1]).longValue();
validity.add(new TimeStampCacheValidity(time));
}
return validity;
} else {
// No data - fallback to previous implementation
return new TimeStampCacheValidity(stylesheet.getLastModified());