public Entry add(String uri, MediaType mediaType, CacheControl cc, MultivaluedMap<String, Object> headers, byte[] entity, String etag)
{
// there's a race condition here with a concurrent get() method above. Too bad JBoss Cache doesn't have a way to create
// a node before hand then insert it
CacheEntry cacheEntry = new CacheEntry(headers, entity, cc.getMaxAge(), etag, mediaType);
Node parent = cache.getRoot().addChild(Fqn.fromElements(uri));
Node leaf = parent.addChild(Fqn.fromElements(mediaType.toString()));
leaf.put("entry", cacheEntry);
leaf.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, (cc.getMaxAge() * 1000) + System.currentTimeMillis());
return cacheEntry;
}