org.mattressframework.api.http.HttpCacheControlDirectives Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mattress-api Show documentation
Show all versions of mattress-api Show documentation
Public API to the Mattress framework. This is essentially what JSR 311
should be.
/*
* Copyright 2007-2008, Josh Devins.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mattressframework.api.http;
/**
* Interface defining all of the constant HTTP cache-control directives as per
* the RFC.
*
*
* - RFC 2616 (HTTP/1.1), Section
* 14.9 Cache-Control
*
*
* @author Josh Devins ([email protected])
*/
public interface HttpCacheControlDirectives {
// request directives
/**
* "no-cache", Section 14.9.1
*/
public static final String REQUEST_NO_CACHE = "no-cache";
/**
* "no-store", Section 14.9.2
*/
public static final String REQUEST_NO_STORE = "no-store";
/**
* "max-age" "=" delta-seconds, Section 14.9.3, 14.9.4
*/
public static final String REQUEST_MAX_AGE = "max-age";
/**
* "max-stale" [ "=" delta-seconds ], Section 14.9.3
*/
public static final String REQUEST_MAX_STALE = "max-stale";
/**
* "min-fresh" "=" delta-seconds, Section 14.9.3
*/
public static final String REQUEST_MIN_FRESH = "min-fresh";
/**
* "no-transform", Section 14.9.5
*/
public static final String REQUEST_NO_TRANSFORM = "no-transform";
/**
* "only-if-cached", Section 14.9.4
*/
public static final String REQUEST_ONLY_IF_CACHED = "only-if-cached";
// response directives
/**
* "public", Section 14.9.1
*/
public static final String RESPONSE_PUBLIC = "public";
/**
* "private" [ "=" <"> 1#field-name <"> ], Section 14.9.1
*/
public static final String RESPONSE_PRIVATE = "private";
/**
* "no-cache" [ "=" <"> 1#field-name <"> ]; Section 14.9.1
*
* @see #REQUEST_NO_CACHE
*/
public static final String RESPONSE_NO_CACHE = REQUEST_NO_CACHE;
/**
* "no-store", Section 14.9.2
*
* @see #REQUEST_NO_STORE
*/
public static final String RESPONSE_NO_STORE = REQUEST_NO_STORE;
/**
* "no-transform", Section 14.9.5
*
* @see #REQUEST_NO_TRANSFORM
*/
public static final String RESPONSE_NO_TRANSFORM = REQUEST_NO_TRANSFORM;
/**
* "must-revalidate", Section 14.9.4
*/
public static final String RESPONSE_MUST_REVALIDATE = "must-revalidate";
/**
* "proxy-revalidate", Section 14.9.4
*/
public static final String RESPONSE_PROXY_REVALIDATE = "proxy-revalidate";
}