* @return <code>true</code> if the resource data does need to be written,
* <code>false</code> otherwise.
*/
public boolean dataNeedsToBeWritten(Attributes attributes)
{
WebRequest request = (WebRequest)attributes.getRequest();
Time ifModifiedSince = request.getIfModifiedSinceHeader();
if (cacheDuration != Duration.NONE && ifModifiedSince != null && lastModified != null)
{
// [Last-Modified] headers have a maximum precision of one second
// so we have to truncate the milliseconds part for a proper compare.