|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
// -*- mode: c++; c-basic-offset:4 -*-
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
|
|
Packit |
a4aae4 |
// Access Protocol.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
// Copyright (c) 2002,2003 OPeNDAP, Inc.
|
|
Packit |
a4aae4 |
// Author: James Gallagher <jgallagher@opendap.org>
|
|
Packit |
a4aae4 |
//
|
|
Packit |
a4aae4 |
// This library is free software; you can redistribute it and/or
|
|
Packit |
a4aae4 |
// modify it under the terms of the GNU Lesser General Public
|
|
Packit |
a4aae4 |
// License as published by the Free Software Foundation; either
|
|
Packit |
a4aae4 |
// version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
a4aae4 |
//
|
|
Packit |
a4aae4 |
// This library is distributed in the hope that it will be useful,
|
|
Packit |
a4aae4 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
a4aae4 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
a4aae4 |
// Lesser General Public License for more details.
|
|
Packit |
a4aae4 |
//
|
|
Packit |
a4aae4 |
// You should have received a copy of the GNU Lesser General Public
|
|
Packit |
a4aae4 |
// License along with this library; if not, write to the Free Software
|
|
Packit |
a4aae4 |
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
a4aae4 |
//
|
|
Packit |
a4aae4 |
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
#ifndef _http_cache_disconnected_mode_h
|
|
Packit |
a4aae4 |
#define _http_cache_disconnected_mode_h
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
namespace libdap
|
|
Packit |
a4aae4 |
{
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
/** Disconnected Operation
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
The cache can be set to handle disconnected operation where it does not
|
|
Packit |
a4aae4 |
use the network to validate entries and does not attempt to load new
|
|
Packit |
a4aae4 |
documents. All requests that cannot be fulfilled by the cache will be
|
|
Packit |
a4aae4 |
returned with a "504 Gateway Timeout" response. There are two operational
|
|
Packit |
a4aae4 |
disconnected modes:
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
No network activity at all: Here it uses its own persistent cache to
|
|
Packit |
a4aae4 |
answer the request, if possible.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
Forward all disconnected requests to a proxy cache: Here it uses the
|
|
Packit |
a4aae4 |
HTTP/1.1 cache-control header to indicate that the proxy should operate in
|
|
Packit |
a4aae4 |
disconnected mode. */
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
typedef enum {
|
|
Packit |
a4aae4 |
DISCONNECT_NONE = 0,
|
|
Packit |
a4aae4 |
DISCONNECT_NORMAL = 1,
|
|
Packit |
a4aae4 |
DISCONNECT_EXTERNAL = 2
|
|
Packit |
a4aae4 |
} CacheDisconnectedMode;
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
} // namespace libdap
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
#endif // _http_cache_disconnected_mode_h
|