if (ret.getCacheInfo() != null && (ret.getCacheInfo().isCacheEnabled() || ret.isEtagGenerationEnabled())) // only GET can declare cache
{
long dateModified;
long expires = 0;
String etag;
ResourceState resourceState = resourceStateHandler.get(key);
if (!ret.getCacheInfo().isCacheEnabled())
{
expires = (GET.ONE_DAY*1000)+System.currentTimeMillis();
}
if (resourceState != null && !resourceState.isExpired())
{
etag = resourceState.getEtag();
dateModified = resourceState.getDateModified();
if (ret.getCacheInfo().isCacheEnabled())
{
expires = ret.getCacheInfo().defineExpires(System.currentTimeMillis());
}
}