public static boolean isNotModified(HttpServletRequest request,HttpServletResponse response,IdentifiableObject object){
  String tag=IdentifiableObjectUtils.getLastUpdatedTag(object);
  response.setHeader(HEADER_ETAG,tag);
  String inputTag=request.getHeader(HEADER_IF_NONE_MATCH);
  if (object != null && inputTag != null && tag != null && inputTag.equals(tag)) {
    response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
    return true;
  }
  return false;
}

public static boolean isNotModified ( HttpServletRequest request , HttpServletResponse response , IdentifiableObject object ) { String tag = IdentifiableObjectUtils . getLastUpdatedTag ( object ) ; response . setHeader ( HEADER_ETAG , tag ) ; String inputTag = request . getHeader ( HEADER_IF_NONE_MATCH ) ; if ( object != null && inputTag != null && tag != null && inputTag . equals ( tag ) ) { response . setStatus ( HttpServletResponse . SC_NOT_MODIFIED ) ; return true ; } return false ; }
returns true if the given object is not modified according to the http cache validation . this method looks up the etag sent in the request from the " if - none - match " header value , generates an etag based on the given collection of identifiableobjects and compares them for equality . if this evaluates to true , it will set status code 304 not modified on the response . it will also set the etag header on the response in any case .
