Package ninja.utils
Interface HttpCacheToolkit
-
- All Known Implementing Classes:
HttpCacheToolkitImpl
public interface HttpCacheToolkit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEtag(Context context, Result result, Long lastModified)Adds etag to result.booleanisModified(Optional<String> etag, Optional<Long> lastModified, Context context)Checks if resource has been modified.
-
-
-
Method Detail
-
isModified
boolean isModified(Optional<String> etag, Optional<Long> lastModified, Context context)
Checks if resource has been modified. Checks via etag or lastModified when etag not present.- Parameters:
etag- - may be absentlastModified- - may be absentcontext- the Context of this request- Returns:
- true if modified / false if not.
-
-