public class HttpCacheToolkitImpl extends Object implements HttpCacheToolkit
| Constructor and Description |
|---|
HttpCacheToolkitImpl(NinjaProperties ninjaProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEtag(Context context,
Result result,
Long lastModified)
Adds etag to result.
|
boolean |
isModified(Optional<String> etag,
Optional<Long> lastModified,
Context context)
Checks if resource has been modified.
|
@Inject public HttpCacheToolkitImpl(NinjaProperties ninjaProperties)
public boolean isModified(Optional<String> etag, Optional<Long> lastModified, Context context)
HttpCacheToolkitisModified in interface HttpCacheToolkitetag - - may be absentlastModified - - may be absentcontext - the Context of this requestpublic void addEtag(Context context, Result result, Long lastModified)
HttpCacheToolkitaddEtag in interface HttpCacheToolkitcontext - The contextresult - The result to populate with etaglastModified - Last modified => In that case used to generate etag.Copyright © 2019 ninjaframework. All rights reserved.