Example usage for com.google.common.net HttpHeaders IF_MODIFIED_SINCE

List of usage examples for com.google.common.net HttpHeaders IF_MODIFIED_SINCE

Introduction

In this page you can find the example usage for com.google.common.net HttpHeaders IF_MODIFIED_SINCE.

Prototype

String IF_MODIFIED_SINCE

To view the source code for com.google.common.net HttpHeaders IF_MODIFIED_SINCE.

Click Source Link

Document

The HTTP If-Modified-Since header field name.

Usage

From source file:com.github.dirkraft.dropwizard.fileassets.FileAssetServlet.java

private boolean isCachedClientSide(HttpServletRequest req, CachedAsset cachedAsset) {
    return cachedAsset.getETag().equals(req.getHeader(HttpHeaders.IF_NONE_MATCH))
            || (req.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE) >= cachedAsset.getLastModifiedTime());
}