Use ETag and If-None-Match for /detail caching
Last-Modified is only second level precision and may allow a client to fail to see subsequent updates within the same second window. Improve the caching check by using an ETag string that is computed from the full timestamp and the row version fields of Change. Change-Id: I58fc95b5396baa1d8afb676ff672c9f19b835f1c
This commit is contained in:
@@ -26,6 +26,15 @@ public interface RestResource {
|
||||
|
||||
/** A resource with a last modification date. */
|
||||
public interface HasLastModified {
|
||||
/**
|
||||
* @return time for the Last-Modified header. HTTP truncates the header
|
||||
* value to seconds.
|
||||
*/
|
||||
public Timestamp getLastModified();
|
||||
}
|
||||
|
||||
/** A resource with an ETag. */
|
||||
public interface HasETag {
|
||||
public String getETag();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user