All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hannesdorfmann.httpkit.cache.DefaultCacheEntryExpirator Maven / Gradle / Ivy

There is a newer version: 1.5.6
Show newest version
package com.hannesdorfmann.httpkit.cache;

/**
 * This {@link CacheEntryExpirator} uses unix timestamps (in miliseconds) in UTC
 * timezone to determine if a {@link CacheEntry} is expired or not.
 * 
 * This one should be used for the http header field "Expires". Example:
 * Expires: Tue, 20 Mar 2007 04:00:25 GMT
 * 
 * @author Hannes Dorfmann
 * 
 */
public class DefaultCacheEntryExpirator implements CacheEntryExpirator {

    public static DefaultCacheEntryExpirator INSTANCE = new DefaultCacheEntryExpirator();

	@Override
	public boolean isExpired(long entryTimestamp) {
		return System.currentTimeMillis() > entryTimestamp;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy