String id = obj.getString("id");
if (bundles.containsKey(id)) {
logger.warn("Rebuilding from dublicate id");
needRebuildCache = true;
}
CachedBundle cs = new CachedBundle();
cs.loadFromJSON(obj, cacheFolder);
CompressorSettings settings = TagCacheFactory
.getCompressorSettings(context.getRealPath("/"));
if (cs.getOptions() != null)
settings.setOptions(cs.getOptions());
String signature = generateSignature(settings, cs
.getFragments(), cs.getOptions(), cs.isScript());
signatureToId.put(signature, id);
bundles.put(id, cs);
} catch (Exception e) {
needRebuildCache = true;
logger.error("Could not load bundle from catalog:", e);