Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f149f58f4a75af135bdb24f5dfe94165 > files > 803

libdap-doc-3.9.3-3mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libdap++: libdap::HTTPCache Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacelibdap.html">libdap</a>::<a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a>
  </div>
</div>
<div class="contents">
<h1>libdap::HTTPCache Class Reference</h1><!-- doxytag: class="libdap::HTTPCache" --><code>#include &lt;<a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for libdap::HTTPCache:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache__coll__graph.png" border="0" usemap="#libdap_1_1HTTPCache__coll__map" alt="Collaboration graph"></center>
<map name="libdap_1_1HTTPCache__coll__map">
<area shape="rect" id="node2" href="classlibdap_1_1HTTPCacheTable.html" title="{libdap::HTTPCacheTable\n|&#45; d_block_size\l&#45; d_cache_index\l&#45; d_cache_root\l&#45; d_cache_table\l&#45; d_current_size\l&#45; d_locked_entries\l&#45; d_new_entries\l|+ bind_entry_to_data()\l+ create_hash_directory()\l+ create_location()\l+ delete_by_hits()\l+ delete_by_size()\l+ delete_expired_entries()\l+ HTTPCacheTable()\l+ is_locked_read_responses()\l+ uncouple_entry_from_data()\l+ ~HTTPCacheTable()\l+ cache_index_delete()\l+ cache_index_parse_line()\l+ cache_index_read()\l+ cache_index_write()\l+ get_block_size()\l+ get_cache_root()\l+ get_current_size()\l+ get_new_entries()\l+ increment_new_entries()\l+ set_block_size()\l+ set_cache_root()\l+ set_current_size()\l&#45; get_cache_table()\l&#45; HTTPCacheTable()\l&#45; HTTPCacheTable()\l&#45; operator=()\l* get_locked_entry_from_cache_table()\l* add_entry_to_cache_table()\l* calculate_time()\l* delete_all_entries()\l* get_locked_entry_from_cache_table()\l* get_write_locked_entry_from_cache_table()\l* parse_headers()\l* remove_cache_entry()\l* remove_entry_from_cache_table()\l* cache_index_delete()\l* cache_index_parse_line()\l* cache_index_read()\l* cache_index_write()\l* get_block_size()\l* get_cache_root()\l* get_current_size()\l* get_new_entries()\l* increment_new_entries()\l* set_block_size()\l* set_cache_root()\l* set_current_size()\l}" alt="" coords="527,160,977,1000"></map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classlibdap_1_1HTTPCache-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#0cbaded239e55f3e328448adcc180365">cache_response</a> (const string &amp;url, time_t request_time, const vector&lt; string &gt; &amp;headers, const FILE *body)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#6f3bbb3dc0b1e85f32e2291006ff858e">get_cached_response</a> (const string &amp;url)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#151026836e9f397857dd76aa080ddfef">get_cached_response</a> (const string &amp;url, vector&lt; string &gt; &amp;headers)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#efcbe732444c6160c839b9e2c3468b1d">get_cached_response</a> (const string &amp;url, vector&lt; string &gt; &amp;headers, string &amp;cacheName)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; string &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#635a277480a95d7d37d0e9fddd480362">get_conditional_request_headers</a> (const string &amp;url)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid</a> (const string &amp;url)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c">lock_cache_interface</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#fee7fca59d1a37f495ea74c95fad600a">purge_cache</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#4de0458e4ab0e89049a0f0fa7b819b91">release_cached_response</a> (FILE *response)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876">unlock_cache_interface</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#b0b1e3fb63084b93e277c53d189ad6c2">update_response</a> (const string &amp;url, time_t request_time, const vector&lt; string &gt; &amp;headers)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#c8fcde4b345c50bad6c3507dcbd2f447">~HTTPCache</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#152bdc19fdec15758d9c1a3a029d6900">instance</a> (const string &amp;cache_root, bool force=false)</td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#99997995a5158687260499f88ea57f36">HTTPCacheInterruptHandler</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#76bd6ce419aad54c8c87e993f5bd11c9">HTTPCacheTest</a></td></tr>

<tr><td colspan="2"><br><h2>Accessors and Mutators for various properties.</h2></td></tr>
<tr><td colspan="2"><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#c0cb038b8b7aa0680b2058267e285e41">get_always_validate</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; string &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#15d15a90105d60b0d743fc90456d223e">get_cache_control</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespacelibdap.html#49a7ae9e704d21900a5bebcb92ebae94">CacheDisconnectedMode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#857226db32577ea790fe2a283d751ce8">get_cache_disconnected</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#7cbd2f101aa03496fa7b7a3223327729">get_cache_root</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#391c78fac4f21bae526d363cd6f66ee7">get_default_expiration</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#1adefd265732d5cd60d0a2a44bfd54a0">get_max_entry_size</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#82e0235b7df1edbdb284b4f790d83cca">get_max_size</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#4492276bc732605cef02a146a657811f">is_cache_enabled</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#0832a441ed8e037653d4e57b5f85813f">is_expire_ignored</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#a9a13a18ec837e891e81823a4d30da47">set_always_validate</a> (bool validate)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#c6823b2de27745c20c7e8d41af5a2088">set_cache_control</a> (const vector&lt; string &gt; &amp;cc)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#44857ae03334d09e34cc5b2275669a71">set_cache_disconnected</a> (<a class="el" href="namespacelibdap.html#49a7ae9e704d21900a5bebcb92ebae94">CacheDisconnectedMode</a> mode)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#71aa835c2b38bc0e891f40b5a77c53ce">set_cache_enabled</a> (bool mode)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#1ca5c8c205241f62596e283943906386">set_default_expiration</a> (int exp_time)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#1a8c5f13e82c3038e97eca9979ebd39c">set_expire_ignored</a> (bool mode)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#92cc5b035dc08ae2704924002144fa29">set_max_entry_size</a> (unsigned long size)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1HTTPCache.html#b2447c27c88ebb29511379ede8ac5b6f">set_max_size</a> (unsigned long size)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Implements a multi-process MT-safe HTTP 1.1 compliant (mostly) cache.<p>
<em>Clients that run as users lacking a writable HOME directory MUST disable this cache. Use Connect::set_cache_enable(false).</em><p>
The original design of this class was taken from the W3C libwww software, written by Henrik Frystyk Nielsen, Copyright MIT 1995. See the file MIT_COPYRIGHT. This software is a complete rewrite in C++ with additional features useful to the DODS and OPeNDAP projects.<p>
This cache does not implement range checking. Partial responses should not be cached (HFN's version did, but it doesn't mesh well with the DAP for which this is being written).<p>
The cache uses the local file system to store responses. If it is being used in a MT application, care should be taken to ensure that the number of available file descriptors is not exceeded.<p>
In addition, when used in a MT program only one thread should use the mutators to set property values. Even though the methods are robust WRT MT software, having several threads change values of cache's properties will lead to odd behavior on the part of the cache. Many of the public methods lock access to the class' interface. This is noted in the documentation for those methods.<p>
Even though the public interface to the cache is typically locked when accessed, an extra locking mechanism is in place for `entries' which are accessed. If a thread accesses a entry, that response must be locked to prevent it from being updated until the thread tells the cache that it's no longer using it. The method get_cache_response() and get_cache_response_body() both lock an entry; use release_cache_response() to release the lock. Entries are locked using a combination of a counter and a mutex. The following methods block when called on a locked entry: <a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid()</a>, <a class="el" href="classlibdap_1_1HTTPCache.html#635a277480a95d7d37d0e9fddd480362">get_conditional_request_headers()</a>, <a class="el" href="classlibdap_1_1HTTPCache.html#b0b1e3fb63084b93e277c53d189ad6c2">update_response()</a>. (The locking scheme could be modified so that a distinction is made between reading from and writing to an entry. In this case <a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid()</a> and <a class="el" href="classlibdap_1_1HTTPCache.html#635a277480a95d7d37d0e9fddd480362">get_conditional_request_headers()</a> would only lock when an entry is in use for writing. But I haven't done that.)<p>
<dl class="todo" compact><dt><b><a class="el" href="todo.html#_todo000029">Todo:</a></b></dt><dd>Update documentation: get_cache_response() now also serves as is_url_in_cache() and <a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid()</a> should only be called after a locked cached response is accessed using get_cahced_response(). These lock the cache for reading. The methods <a class="el" href="classlibdap_1_1HTTPCache.html#0cbaded239e55f3e328448adcc180365">cache_response()</a> and <a class="el" href="classlibdap_1_1HTTPCache.html#b0b1e3fb63084b93e277c53d189ad6c2">update_response()</a> lock an entry for writing.</dd></dl>
<dl class="todo" compact><dt><b><a class="el" href="todo.html#_todo000029">Todo:</a></b></dt><dd>Check that the lock-for-write and lock-for-read work together since it's possible that an entry in use might have a stream of readers and never free the 'read-lock' thus blocking a writer.</dd></dl>
<dl class="author" compact><dt><b>Author:</b></dt><dd>James Gallagher &lt;<a href="mailto:jgallagher@opendap.org">jgallagher@opendap.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8h_source.html#l00138">138</a> of file <a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c8fcde4b345c50bad6c3507dcbd2f447"></a><!-- doxytag: member="libdap::HTTPCache::~HTTPCache" ref="c8fcde4b345c50bad6c3507dcbd2f447" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">libdap::HTTPCache::~HTTPCache           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy an instance of <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a>. This writes the cache index and frees the in-memory cache table structure. The persistent cache (the response headers and bodies and the index file) are not removed. To remove those, either erase the directory that contains the cache using a file system command or use the <a class="el" href="classlibdap_1_1HTTPCache.html#fee7fca59d1a37f495ea74c95fad600a">purge_cache()</a> method (which leaves the cache directory structure in place but removes all the cached information).<p>
This class uses the singleton pattern. Clients should <em>never</em> call this method. The <a class="el" href="classlibdap_1_1HTTPCache.html#152bdc19fdec15758d9c1a3a029d6900">HTTPCache::instance()</a> method arranges to call the HTTPCache::delete_instance() using <code>atexit()</code>. If delete is called more than once, the result will likely be an index file that is corrupt. 
<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00317">317</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00404">libdap::HTTPCacheTable::cache_index_write()</a>, <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, <a class="el" href="HTTPCache_8h_source.html#l00077">DESTROY</a>, and <a class="el" href="Error_8cc_source.html#l00279">libdap::Error::get_error_message()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_c8fcde4b345c50bad6c3507dcbd2f447_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_c8fcde4b345c50bad6c3507dcbd2f447_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_c8fcde4b345c50bad6c3507dcbd2f447_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#7cd5a3a24fd0cd41ac0d9a3192075e9c" title="libdap::HTTPCacheTable::cache_index_write" alt="" coords="365,5,797,32"><area shape="rect" id="node5" href="classlibdap_1_1Error.html#917fdf537b7dd7e587e9cf6dc7e4c687" title="libdap::Error::get_error_message" alt="" coords="411,56,752,83"><area shape="rect" id="node7" href="classlibdap_1_1Error.html#5624b1cca8a752a24d76a50e092fd61e" title="Is the Error object valid?" alt="" coords="845,56,1037,83"></map>
</div>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0cbaded239e55f3e328448adcc180365"></a><!-- doxytag: member="libdap::HTTPCache::cache_response" ref="0cbaded239e55f3e328448adcc180365" args="(const string &amp;url, time_t request_time, const vector&lt; string &gt; &amp;headers, const FILE *body)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libdap::HTTPCache::cache_response           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&nbsp;</td>
          <td class="paramname"> <em>request_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>headers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const FILE *&nbsp;</td>
          <td class="paramname"> <em>body</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new response to the cache, or replace an existing cached response with new data. This method returns True if the information for <code>url</code> was added to the cache. A response might not be cache-able; in that case this method returns false. (For example, the response might contain the 'Cache-Control: no-cache' header.)<p>
Note that the FILE *body is rewound so that the caller can re-read it without using fseek or rewind.<p>
If a response for <code>url</code> is already present in the cache, it will be replaced by the new headers and body. To update a response in the cache with new meta data, use <a class="el" href="classlibdap_1_1HTTPCache.html#b0b1e3fb63084b93e277c53d189ad6c2">update_response()</a>.<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>A string which holds the request URL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>request_time</em>&nbsp;</td><td>The time when the request was made, in seconds since 1 Jan 1970. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>headers</em>&nbsp;</td><td>A vector of strings which hold the response headers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>body</em>&nbsp;</td><td>A FILE * to a file which holds the response body. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the response was cached, False if the response could not be cached. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a></em>&nbsp;</td><td>Thrown if there was a I/O error while writing to the persistent store. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01143">1143</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00539">libdap::HTTPCacheTable::add_entry_to_cache_table()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00404">libdap::HTTPCacheTable::cache_index_write()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00740">libdap::HTTPCacheTable::calculate_time()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00487">libdap::HTTPCacheTable::create_location()</a>, <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="HTTPCache_8cc_source.html#l00106">DUMP_FREQUENCY</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00139">libdap::HTTPCacheTable::CacheEntry::get_cachename()</a>, <a class="el" href="Error_8cc_source.html#l00279">libdap::Error::get_error_message()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00299">libdap::HTTPCacheTable::get_new_entries()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00172">libdap::HTTPCacheTable::CacheEntry::is_no_cache()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00207">libdap::HTTPCacheTable::CacheEntry::lock_write_response()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00783">libdap::HTTPCacheTable::parse_headers()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00086">REMOVE</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00682">libdap::HTTPCacheTable::remove_entry_from_cache_table()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00154">libdap::HTTPCacheTable::CacheEntry::set_size()</a>, <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>, and <a class="el" href="HTTPCacheTable_8h_source.html#l00214">libdap::HTTPCacheTable::CacheEntry::unlock_write_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_0cbaded239e55f3e328448adcc180365_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_0cbaded239e55f3e328448adcc180365_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_0cbaded239e55f3e328448adcc180365_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#8f5660848048a98454fce23c28de573c" title="libdap::HTTPCacheTable::add_entry_to_cache_table" alt="" coords="451,5,952,32"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCacheTable.html#7cd5a3a24fd0cd41ac0d9a3192075e9c" title="libdap::HTTPCacheTable::cache_index_write" alt="" coords="485,56,917,83"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCacheTable.html#0ca63c76e70064549d128ff8f5951534" title="libdap::HTTPCacheTable::calculate_time" alt="" coords="501,107,901,133"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCacheTable.html#0ab52cb3d5d01575977adb33a21b31d2" title="libdap::HTTPCacheTable::create_location" alt="" coords="496,157,907,184"><area shape="rect" id="node15" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#78b388e7b644a3548a7d548550603fd9" title="libdap::HTTPCacheTable::CacheEntry::get_cachename" alt="" coords="445,208,957,235"><area shape="rect" id="node17" href="classlibdap_1_1Error.html#917fdf537b7dd7e587e9cf6dc7e4c687" title="libdap::Error::get_error_message" alt="" coords="531,259,872,285"><area shape="rect" id="node21" href="classlibdap_1_1HTTPCacheTable.html#7a412fb2155e6bcaab3ce15a2d8121a5" title="libdap::HTTPCacheTable::get_new_entries" alt="" coords="496,309,907,336"><area shape="rect" id="node23" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#c58af16f8cfb31f08020d64ca1914407" title="libdap::HTTPCacheTable::CacheEntry::is_no_cache" alt="" coords="456,360,947,387"><area shape="rect" id="node25" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="496,411,907,437"><area shape="rect" id="node27" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#127f19c06a5f0d2da8b55e4d0d175ae2" title="libdap::HTTPCacheTable::CacheEntry::lock_write_response" alt="" coords="416,461,987,488"><area shape="rect" id="node29" href="classlibdap_1_1HTTPCacheTable.html#53379f3151fe6b85e85c75c401a14963" title="libdap::HTTPCacheTable::parse_headers" alt="" coords="505,512,897,539"><area shape="rect" id="node35" href="classlibdap_1_1HTTPCacheTable.html#d1b8ffd257ff335b3d87b90600f5bffd" title="libdap::HTTPCacheTable::remove_entry_from_cache_table" alt="" coords="425,563,977,589"><area shape="rect" id="node39" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#6711b2f4b3ebc87f2f6b87da87d0f44b" title="libdap::HTTPCacheTable::CacheEntry::set_size" alt="" coords="471,613,932,640"><area shape="rect" id="node41" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="485,664,917,691"><area shape="rect" id="node43" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#0cddc0fbf4569c5e323e79c5ec098c22" title="libdap::HTTPCacheTable::CacheEntry::unlock_write_response" alt="" coords="405,715,997,741"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCacheTable.html#f17bd7a96186412f3ef53caed42db767" title="libdap::HTTPCacheTable::increment_new_entries" alt="" coords="1060,5,1532,32"><area shape="rect" id="node13" href="classlibdap_1_1HTTPCacheTable.html#0f7f6193848fb3ba8ad17082fd95b6c6" title="libdap::HTTPCacheTable::create_hash_directory" alt="" coords="1060,157,1532,184"><area shape="rect" id="node19" href="classlibdap_1_1Error.html#5624b1cca8a752a24d76a50e092fd61e" title="Is the Error object valid?" alt="" coords="1200,259,1392,285"><area shape="rect" id="node31" href="namespacelibdap.html#baf4e1a6a665dbfe9324b25ec9fa701a" title="libdap::parse_time" alt="" coords="1196,461,1396,488"><area shape="rect" id="node33" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#112b8ac8aa541ca9a06af7de4d80fc03" title="libdap::HTTPCacheTable::CacheEntry::set_no_cache" alt="" coords="1045,512,1547,539"><area shape="rect" id="node37" href="namespacelibdap.html#68a16ef70e29c367dabd3cb5165c386a" title="libdap::get_hash" alt="" coords="1205,563,1387,589"></map>
</div>

</div>
</div><p>
<a class="anchor" name="c0cb038b8b7aa0680b2058267e285e41"></a><!-- doxytag: member="libdap::HTTPCache::get_always_validate" ref="c0cb038b8b7aa0680b2058267e285e41" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libdap::HTTPCache::get_always_validate           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Should every cache entry be validated before each use? <dl class="return" compact><dt><b>Returns:</b></dt><dd>True if all cache entries require validation. </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00844">844</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="15d15a90105d60b0d743fc90456d223e"></a><!-- doxytag: member="libdap::HTTPCache::get_cache_control" ref="15d15a90105d60b0d743fc90456d223e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; string &gt; libdap::HTTPCache::get_cache_control           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the Cache-Control headers.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A vector of strings, one string for each header. </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00914">914</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="857226db32577ea790fe2a283d751ce8"></a><!-- doxytag: member="libdap::HTTPCache::get_cache_disconnected" ref="857226db32577ea790fe2a283d751ce8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacelibdap.html#49a7ae9e704d21900a5bebcb92ebae94">CacheDisconnectedMode</a> libdap::HTTPCache::get_cache_disconnected           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the cache's disconnected mode property. 
<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00669">669</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="7cbd2f101aa03496fa7b7a3223327729"></a><!-- doxytag: member="libdap::HTTPCache::get_cache_root" ref="7cbd2f101aa03496fa7b7a3223327729" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string libdap::HTTPCache::get_cache_root           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current cache root directory. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A string that contains the cache root directory. </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00526">526</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="6f3bbb3dc0b1e85f32e2291006ff858e"></a><!-- doxytag: member="libdap::HTTPCache::get_cached_response" ref="6f3bbb3dc0b1e85f32e2291006ff858e" args="(const string &amp;url)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE * libdap::HTTPCache::get_cached_response           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a pointer to a cached response body. This is a convenience method that calls the three parameter version of get_cache_response().<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Find the body associated with this URL. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A FILE* that points to the response body. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the URL is not in the cache. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a></em>&nbsp;</td><td>Thrown if an I/O error is detected. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01564">1564</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8cc_source.html#l01494">get_cached_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_6f3bbb3dc0b1e85f32e2291006ff858e_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_6f3bbb3dc0b1e85f32e2291006ff858e_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_6f3bbb3dc0b1e85f32e2291006ff858e_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#efcbe732444c6160c839b9e2c3468b1d" title="libdap::HTTPCache::get_cached_response" alt="" coords="457,81,857,108"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCacheTable.html#24b2c86910ba623a59184ab42410b4cb" title="libdap::HTTPCacheTable::bind_entry_to_data" alt="" coords="943,5,1383,32"><area shape="rect" id="node7" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#78b388e7b644a3548a7d548550603fd9" title="libdap::HTTPCacheTable::CacheEntry::get_cachename" alt="" coords="907,56,1419,83"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="957,107,1368,133"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="947,157,1379,184"></map>
</div>

</div>
</div><p>
<a class="anchor" name="151026836e9f397857dd76aa080ddfef"></a><!-- doxytag: member="libdap::HTTPCache::get_cached_response" ref="151026836e9f397857dd76aa080ddfef" args="(const string &amp;url, vector&lt; string &gt; &amp;headers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE * libdap::HTTPCache::get_cached_response           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>headers</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get information from the cache. This is a convenience method that calls the three parameter version of get_cache_response().<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Get response information for this URL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>headers</em>&nbsp;</td><td>Return the response headers in this parameter </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A FILE * to the response body. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the URL's response is not in the cache. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a></em>&nbsp;</td><td>Thrown if the persistent store cannot be opened. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01547">1547</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8cc_source.html#l01494">get_cached_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_151026836e9f397857dd76aa080ddfef_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_151026836e9f397857dd76aa080ddfef_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_151026836e9f397857dd76aa080ddfef_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#efcbe732444c6160c839b9e2c3468b1d" title="libdap::HTTPCache::get_cached_response" alt="" coords="457,81,857,108"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCacheTable.html#24b2c86910ba623a59184ab42410b4cb" title="libdap::HTTPCacheTable::bind_entry_to_data" alt="" coords="943,5,1383,32"><area shape="rect" id="node7" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#78b388e7b644a3548a7d548550603fd9" title="libdap::HTTPCacheTable::CacheEntry::get_cachename" alt="" coords="907,56,1419,83"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="957,107,1368,133"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="947,157,1379,184"></map>
</div>

</div>
</div><p>
<a class="anchor" name="efcbe732444c6160c839b9e2c3468b1d"></a><!-- doxytag: member="libdap::HTTPCache::get_cached_response" ref="efcbe732444c6160c839b9e2c3468b1d" args="(const string &amp;url, vector&lt; string &gt; &amp;headers, string &amp;cacheName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE * libdap::HTTPCache::get_cached_response           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>headers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string &amp;&nbsp;</td>
          <td class="paramname"> <em>cacheName</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get information from the cache. For a given URL, get the headers, cache object name and body stored in the cache. Note that this method increments the hit counter for <code>url</code>'s entry and <em>locks</em> that entry. To release the lock, the method <a class="el" href="classlibdap_1_1HTTPCache.html#4de0458e4ab0e89049a0f0fa7b819b91">release_cached_response()</a> <em>must</em> be called. Methods that block on a locked entry are: <a class="el" href="classlibdap_1_1HTTPCache.html#635a277480a95d7d37d0e9fddd480362">get_conditional_request_headers()</a>, <a class="el" href="classlibdap_1_1HTTPCache.html#b0b1e3fb63084b93e277c53d189ad6c2">update_response()</a> and <a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid()</a>. In addition, <a class="el" href="classlibdap_1_1HTTPCache.html#fee7fca59d1a37f495ea74c95fad600a">purge_cache()</a> throws <a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a> if it's called and any entries are locked. The garbage collection system will not reclaim locked entries (but works fine when some entries are locked).<p>
This method locks the class' interface.<p>
This method does <em>not</em> check to see that the response is valid, just that it is in the cache. To see if a cached response is valid, use <a class="el" href="classlibdap_1_1HTTPCache.html#a695d43815cc2588458232f37095b780">is_url_valid()</a>. The FILE* returned can be used for both reading and writing. The latter allows a client to update the body of a cached response without having to first dump it all to a separate file and then copy it into the cache (using <a class="el" href="classlibdap_1_1HTTPCache.html#0cbaded239e55f3e328448adcc180365">cache_response()</a>).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Get response information for this URL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>headers</em>&nbsp;</td><td>Return the response headers in this parameter </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cacheName</em>&nbsp;</td><td>A value-result parameter; the name of the cache file </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A FILE * to the response body. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the URL's response is not in the cache. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a></em>&nbsp;</td><td>Thrown if the persistent store cannot be opened. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01494">1494</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00837">libdap::HTTPCacheTable::bind_entry_to_data()</a>, <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00139">libdap::HTTPCacheTable::CacheEntry::get_cachename()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPCache_8cc_source.html#l01547">get_cached_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_efcbe732444c6160c839b9e2c3468b1d_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_efcbe732444c6160c839b9e2c3468b1d_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_efcbe732444c6160c839b9e2c3468b1d_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#24b2c86910ba623a59184ab42410b4cb" title="libdap::HTTPCacheTable::bind_entry_to_data" alt="" coords="492,5,932,32"><area shape="rect" id="node5" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#78b388e7b644a3548a7d548550603fd9" title="libdap::HTTPCacheTable::CacheEntry::get_cachename" alt="" coords="456,56,968,83"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="507,107,917,133"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="496,157,928,184"></map>
</div>

</div>
</div><p>
<a class="anchor" name="635a277480a95d7d37d0e9fddd480362"></a><!-- doxytag: member="libdap::HTTPCache::get_conditional_request_headers" ref="635a277480a95d7d37d0e9fddd480362" args="(const string &amp;url)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; string &gt; libdap::HTTPCache::get_conditional_request_headers           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Build the headers to send along with a GET request to make that request conditional. This method examines the headers for a given response in the cache and formulates the correct headers for a valid HTTP 1.1 conditional GET request. See RFC 2616, Section 13.3.4.<p>
Rules: If an ETag is present, it must be used. Use If-None-Match. If a Last-Modified header is present, use it. Use If-Modified-Since. If both are present, use both (this means that HTTP 1.0 daemons are more likely to work). If a Last-Modified header is not present, use the value of the Cache-Control max-age or Expires header(s). Note that a 'Cache-Control: max-age' header overrides an Expires header (Sec 14.9.3).<p>
This method locks the cache interface and the cache entry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Get the <a class="el" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html">HTTPCacheTable::CacheEntry</a> for this URL. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A vector of strings, one request header per string. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the <em>url</em> is not in the cache. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01236">1236</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="util__mit_8cc_source.html#l00284">libdap::date_time_str()</a>, <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00142">libdap::HTTPCacheTable::CacheEntry::get_etag()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00148">libdap::HTTPCacheTable::CacheEntry::get_expires()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00145">libdap::HTTPCacheTable::CacheEntry::get_lm()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00151">libdap::HTTPCacheTable::CacheEntry::get_max_age()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>, and <a class="el" href="HTTPCacheTable_8h_source.html#l00198">libdap::HTTPCacheTable::CacheEntry::unlock_read_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_635a277480a95d7d37d0e9fddd480362_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_635a277480a95d7d37d0e9fddd480362_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_635a277480a95d7d37d0e9fddd480362_cgraph_map">
<area shape="rect" id="node3" href="namespacelibdap.html#b9983dcf36d072b24f4ecee5558d790a" title="libdap::date_time_str" alt="" coords="751,5,983,32"><area shape="rect" id="node5" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#6c442bb2e75458b0221fdc0e33a1b987" title="libdap::HTTPCacheTable::CacheEntry::get_etag" alt="" coords="636,56,1097,83"><area shape="rect" id="node7" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#d6c75b405f431deafaba0ce949e514bc" title="libdap::HTTPCacheTable::CacheEntry::get_expires" alt="" coords="621,107,1112,133"><area shape="rect" id="node9" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#45a937fc7a01fe7b9eff6ed71234ae90" title="libdap::HTTPCacheTable::CacheEntry::get_lm" alt="" coords="647,157,1087,184"><area shape="rect" id="node11" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#15c27c48f367f79bded48569b4d12351" title="libdap::HTTPCacheTable::CacheEntry::get_max_age" alt="" coords="621,208,1112,235"><area shape="rect" id="node13" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="661,259,1072,285"><area shape="rect" id="node15" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="651,309,1083,336"><area shape="rect" id="node17" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#e2db6d25b27dd657dd0a2ef553e28246" title="libdap::HTTPCacheTable::CacheEntry::unlock_read_response" alt="" coords="576,360,1157,387"></map>
</div>

</div>
</div><p>
<a class="anchor" name="391c78fac4f21bae526d363cd6f66ee7"></a><!-- doxytag: member="libdap::HTTPCache::get_default_expiration" ref="391c78fac4f21bae526d363cd6f66ee7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libdap::HTTPCache::get_default_expiration           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the default expiration time used by the cache. 
<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00825">825</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="1adefd265732d5cd60d0a2a44bfd54a0"></a><!-- doxytag: member="libdap::HTTPCache::get_max_entry_size" ref="1adefd265732d5cd60d0a2a44bfd54a0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long libdap::HTTPCache::get_max_entry_size           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the maximum size of an individual entry in the cache.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The maximum size in megabytes. </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00797">797</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8cc_source.html#l00108">MEGA</a>.</p>

</div>
</div><p>
<a class="anchor" name="82e0235b7df1edbdb284b4f790d83cca"></a><!-- doxytag: member="libdap::HTTPCache::get_max_size" ref="82e0235b7df1edbdb284b4f790d83cca" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long libdap::HTTPCache::get_max_size           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
How big is the cache? The value returned is the size in megabytes. 
<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00752">752</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8cc_source.html#l00108">MEGA</a>.</p>

</div>
</div><p>
<a class="anchor" name="152bdc19fdec15758d9c1a3a029d6900"></a><!-- doxytag: member="libdap::HTTPCache::instance" ref="152bdc19fdec15758d9c1a3a029d6900" args="(const string &amp;cache_root, bool force=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> * libdap::HTTPCache::instance           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>cache_root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>force</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a pointer to the HTTP 1.1 compliant cache. If not already instantiated, this creates an instance of the HTTP cache object and initializes it to use <code>cache_root</code> as the location of the persistent store. If there's an index (<code></code>.index) file in that directory, it is read as part of the initialization. If the cache has already been initialized, this method returns a pointer to that instance. Note <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> uses the singleton pattern; A process may have only one instance of this object. Also note that <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> is MT-safe. However, if the <code>force</code> parameter is set to true, it may be possible for two or more processes to access the persistent store at the same time resulting in undefined behavior.<p>
Default values: <a class="el" href="classlibdap_1_1HTTPCache.html#4492276bc732605cef02a146a657811f">is_cache_enabled()</a>: true, is_cache_protected(): false, <a class="el" href="classlibdap_1_1HTTPCache.html#0832a441ed8e037653d4e57b5f85813f">is_expire_ignored()</a>: false, the total size of the cache is 20M, 2M of that is reserved for response headers, during GC the cache is reduced to at least 18M (total size - 10% of the total size), and the max size for an individual entry is 3M. It is possible to change the size of the cache, but not to make it smaller than 5M. If expiration information is not sent with a response, it is assumed to expire in 24 hours.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cache_root</em>&nbsp;</td><td>The fully qualified pathname of the directory which will hold the cache data (i.e., the persistent store). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>force</em>&nbsp;</td><td>Force access to the persistent store if true. By default false. Use this only if you're sure no one else is using the same cache root! This is included so that programs may use a cache that was left in an inconsistent state. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> object. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>thrown if the cache root cannot set. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00154">154</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="debug_8h_source.html#l00073">DBG2</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, <a class="el" href="HTTPCache_8h_source.html#l00073">LOCK</a>, and <a class="el" href="HTTPCache_8h_source.html#l00075">UNLOCK</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

</div>
</div><p>
<a class="anchor" name="4492276bc732605cef02a146a657811f"></a><!-- doxytag: member="libdap::HTTPCache::is_cache_enabled" ref="4492276bc732605cef02a146a657811f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libdap::HTTPCache::is_cache_enabled           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is the cache currently enabled? 
<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00639">639</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="debug_8h_source.html#l00073">DBG2</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00645">libdap::HTTPConnect::fetch_url()</a>, and <a class="el" href="HTTPConnect_8h_source.html#l00162">libdap::HTTPConnect::is_cache_enabled()</a>.</p>

</div>
</div><p>
<a class="anchor" name="0832a441ed8e037653d4e57b5f85813f"></a><!-- doxytag: member="libdap::HTTPCache::is_expire_ignored" ref="0832a441ed8e037653d4e57b5f85813f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libdap::HTTPCache::is_expire_ignored           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00696">696</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="a695d43815cc2588458232f37095b780"></a><!-- doxytag: member="libdap::HTTPCache::is_url_valid" ref="a695d43815cc2588458232f37095b780" args="(const string &amp;url)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libdap::HTTPCache::is_url_valid           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Look in the cache and return the status (validity) of the cached response. This method should be used to determine if a cached response requires validation.<p>
This method locks the class' interface and the cache entry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Find the cached response associated with this URL. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True indicates that the response can be used, False indicates that it must first be validated. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the URL's response is not in the cache. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01387">1387</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00163">libdap::HTTPCacheTable::CacheEntry::get_corrected_initial_age()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00157">libdap::HTTPCacheTable::CacheEntry::get_freshness_lifetime()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00166">libdap::HTTPCacheTable::CacheEntry::get_must_revalidate()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00160">libdap::HTTPCacheTable::CacheEntry::get_response_time()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>, and <a class="el" href="HTTPCacheTable_8h_source.html#l00198">libdap::HTTPCacheTable::CacheEntry::unlock_read_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_a695d43815cc2588458232f37095b780_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_a695d43815cc2588458232f37095b780_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_a695d43815cc2588458232f37095b780_cgraph_map">
<area shape="rect" id="node3" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#83412eeb15ec59d73b2407943d0a4a04" title="libdap::HTTPCacheTable::CacheEntry::get_corrected_initial_age" alt="" coords="387,5,1019,32"><area shape="rect" id="node5" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#59da6c588993d40d2829a90cc0c67f1a" title="libdap::HTTPCacheTable::CacheEntry::get_freshness_lifetime" alt="" coords="403,56,1003,83"><area shape="rect" id="node7" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#d654840f637bcaf7232ccf851469daba" title="libdap::HTTPCacheTable::CacheEntry::get_must_revalidate" alt="" coords="417,107,988,133"><area shape="rect" id="node9" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#7002294360aa52d1dd86dedca57c7e6d" title="libdap::HTTPCacheTable::CacheEntry::get_response_time" alt="" coords="427,157,979,184"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="497,208,908,235"><area shape="rect" id="node13" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="487,259,919,285"><area shape="rect" id="node15" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#e2db6d25b27dd657dd0a2ef553e28246" title="libdap::HTTPCacheTable::CacheEntry::unlock_read_response" alt="" coords="412,309,993,336"></map>
</div>

</div>
</div><p>
<a class="anchor" name="71ed87540113c4403a33bb436d3f8b9c"></a><!-- doxytag: member="libdap::HTTPCache::lock_cache_interface" ref="71ed87540113c4403a33bb436d3f8b9c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::lock_cache_interface           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="HTTPCache_8h_source.html#l00247">247</a> of file <a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>.</p>

<p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, and <a class="el" href="HTTPCache_8h_source.html#l00073">LOCK</a>.</p>

<p>Referenced by <a class="el" href="HTTPCache_8cc_source.html#l01143">cache_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01494">get_cached_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01236">get_conditional_request_headers()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01387">is_url_valid()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01612">purge_cache()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01584">release_cached_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00866">set_cache_control()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00657">set_cache_disconnected()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00627">set_cache_enabled()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00813">set_default_expiration()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00683">set_expire_ignored()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00766">set_max_entry_size()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00717">set_max_size()</a>, and <a class="el" href="HTTPCache_8cc_source.html#l01312">update_response()</a>.</p>

</div>
</div><p>
<a class="anchor" name="fee7fca59d1a37f495ea74c95fad600a"></a><!-- doxytag: member="libdap::HTTPCache::purge_cache" ref="fee7fca59d1a37f495ea74c95fad600a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::purge_cache           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Purge both the in-memory cache table and the contents of the cache on disk. This method deletes every entry in the persistent store but leaves the structure intact. The client of <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> is responsible for making sure that all threads have released any responses they pulled from the cache. If this method is called when a response is still in use, it will throw an <a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a> object and not purge the cache.<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if an attempt is made to purge the cache when an entry is still in use. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01612">1612</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00711">libdap::HTTPCacheTable::delete_all_entries()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00857">libdap::HTTPCacheTable::is_locked_read_responses()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_fee7fca59d1a37f495ea74c95fad600a_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_fee7fca59d1a37f495ea74c95fad600a_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_fee7fca59d1a37f495ea74c95fad600a_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#d02f9346125f4c311d6e74b6a8354f9e" title="libdap::HTTPCacheTable::delete_all_entries" alt="" coords="407,5,847,32"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCacheTable.html#fc2ef03d687c3db809e2bfbc3bca3bd3" title="libdap::HTTPCacheTable::is_locked_read_responses" alt="" coords="376,56,877,83"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="421,107,832,133"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="411,157,843,184"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCacheTable.html#3e636690b069b3384e908135fcaebd51" title="libdap::HTTPCacheTable::cache_index_delete" alt="" coords="927,5,1367,32"></map>
</div>

</div>
</div><p>
<a class="anchor" name="4de0458e4ab0e89049a0f0fa7b819b91"></a><!-- doxytag: member="libdap::HTTPCache::release_cached_response" ref="4de0458e4ab0e89049a0f0fa7b819b91" args="(FILE *response)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::release_cached_response           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>body</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Call this method to inform the cache that a particular response is no longer in use. When a response is accessed using <a class="el" href="classlibdap_1_1HTTPCache.html#efcbe732444c6160c839b9e2c3468b1d">get_cached_response()</a>, it is locked so that updates and removal (e.g., by the garbage collector) are not possible. Calling this method frees that lock.<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>body</em>&nbsp;</td><td>Release the lock on the response information associated with this FILE *. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if <code>body</code> does not belong to an entry in the cache or if the entry was already released. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01584">1584</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00845">libdap::HTTPCacheTable::uncouple_entry_from_data()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPCacheResponse_8h_source.html#l00074">libdap::HTTPCacheResponse::~HTTPCacheResponse()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_4de0458e4ab0e89049a0f0fa7b819b91_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_4de0458e4ab0e89049a0f0fa7b819b91_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_4de0458e4ab0e89049a0f0fa7b819b91_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="541,5,952,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCacheTable.html#d0ac242f618a804562e18546738904df" title="libdap::HTTPCacheTable::uncouple_entry_from_data" alt="" coords="496,56,997,83"><area shape="rect" id="node9" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="531,107,963,133"><area shape="rect" id="node7" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#e2db6d25b27dd657dd0a2ef553e28246" title="libdap::HTTPCacheTable::CacheEntry::unlock_read_response" alt="" coords="1045,56,1627,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="a9a13a18ec837e891e81823a4d30da47"></a><!-- doxytag: member="libdap::HTTPCache::set_always_validate" ref="a9a13a18ec837e891e81823a4d30da47" args="(bool validate)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_always_validate           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>validate</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Should every cache entry be validated? <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>validate</em>&nbsp;</td><td>True if every cache entry should be validated before being used. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00835">835</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c6823b2de27745c20c7e8d41af5a2088"></a><!-- doxytag: member="libdap::HTTPCache::set_cache_control" ref="c6823b2de27745c20c7e8d41af5a2088" args="(const vector&lt; string &gt; &amp;cc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_cache_control           </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>cc</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the request Cache-Control headers. If a request must be satisfied using HTTP, these headers should be included in request since they might be pertinent to a proxy cache.<p>
Ignored headers: no-transform, only-if-cached. These headers are not used by <a class="el" href="classlibdap_1_1HTTPCache.html">HTTPCache</a> and are not recorded. However, if present in the vector passed to this method, they will be present in the vector returned by get_cache_control.<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cc</em>&nbsp;</td><td>A vector of strings, each string holds one Cache-Control header. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a></em>&nbsp;</td><td>Thrown if one of the strings in <code>cc</code> does not start with 'Cache-Control: '. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00866">866</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="util__mit_8cc_source.html#l00132">libdap::parse_time()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_c6823b2de27745c20c7e8d41af5a2088_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_c6823b2de27745c20c7e8d41af5a2088_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_c6823b2de27745c20c7e8d41af5a2088_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="445,5,856,32"><area shape="rect" id="node5" href="namespacelibdap.html#baf4e1a6a665dbfe9324b25ec9fa701a" title="libdap::parse_time" alt="" coords="551,56,751,83"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="435,107,867,133"></map>
</div>

</div>
</div><p>
<a class="anchor" name="44857ae03334d09e34cc5b2275669a71"></a><!-- doxytag: member="libdap::HTTPCache::set_cache_disconnected" ref="44857ae03334d09e34cc5b2275669a71" args="(CacheDisconnectedMode mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_cache_disconnected           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacelibdap.html#49a7ae9e704d21900a5bebcb92ebae94">CacheDisconnectedMode</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the cache's disconnected property. The cache can operate either disconnected from the network or using a proxy cache (but tell that proxy not to use the network).<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>One of DISCONNECT_NONE, DISCONNECT_NORMAL or DISCONNECT_EXTERNAL. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd>CacheDIsconnectedMode </dd></dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00657">657</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_44857ae03334d09e34cc5b2275669a71_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_44857ae03334d09e34cc5b2275669a71_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_44857ae03334d09e34cc5b2275669a71_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="496,5,907,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="485,56,917,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="71aa835c2b38bc0e891f40b5a77c53ce"></a><!-- doxytag: member="libdap::HTTPCache::set_cache_enabled" ref="71aa835c2b38bc0e891f40b5a77c53ce" args="(bool mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_cache_enabled           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>mode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enable or disable the cache. The cache can be temporarily suspended using the enable/disable property. This does not prevent the cache from being enabled/disable at a later point in time.<p>
Default: yes<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>True if the cache should be enabled, False if it should be disabled. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00627">627</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>, and <a class="el" href="HTTPConnect_8h_source.html#l00155">libdap::HTTPConnect::set_cache_enabled()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_71aa835c2b38bc0e891f40b5a77c53ce_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_71aa835c2b38bc0e891f40b5a77c53ce_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_71aa835c2b38bc0e891f40b5a77c53ce_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="445,5,856,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="435,56,867,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="1ca5c8c205241f62596e283943906386"></a><!-- doxytag: member="libdap::HTTPCache::set_default_expiration" ref="1ca5c8c205241f62596e283943906386" args="(int exp_time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_default_expiration           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>exp_time</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the default expiration time. Use the <em>default expiration</em> property to determine when a cached response becomes stale if the response lacks the information necessary to compute a specific value.<p>
Default: 24 hours (86,400 seconds)<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>exp_time</em>&nbsp;</td><td>The time in seconds. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00813">813</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_1ca5c8c205241f62596e283943906386_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_1ca5c8c205241f62596e283943906386_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_1ca5c8c205241f62596e283943906386_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="496,5,907,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="485,56,917,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="1a8c5f13e82c3038e97eca9979ebd39c"></a><!-- doxytag: member="libdap::HTTPCache::set_expire_ignored" ref="1a8c5f13e82c3038e97eca9979ebd39c" args="(bool mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_expire_ignored           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>mode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
How should the cache handle the Expires header? Default: no<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>True if a responses Expires header should be ignored, False otherwise. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00683">683</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_1a8c5f13e82c3038e97eca9979ebd39c_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_1a8c5f13e82c3038e97eca9979ebd39c_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_1a8c5f13e82c3038e97eca9979ebd39c_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="456,5,867,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="445,56,877,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="92cc5b035dc08ae2704924002144fa29"></a><!-- doxytag: member="libdap::HTTPCache::set_max_entry_size" ref="92cc5b035dc08ae2704924002144fa29" args="(unsigned long size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_max_entry_size           </td>
          <td>(</td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>size</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the maximum size for a single entry in the cache.<p>
Default: 3M<p>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The size in megabytes. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00766">766</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00404">libdap::HTTPCacheTable::cache_index_write()</a>, <a class="el" href="debug_8h_source.html#l00073">DBG2</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00108">MEGA</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_92cc5b035dc08ae2704924002144fa29_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_92cc5b035dc08ae2704924002144fa29_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_92cc5b035dc08ae2704924002144fa29_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#7cd5a3a24fd0cd41ac0d9a3192075e9c" title="libdap::HTTPCacheTable::cache_index_write" alt="" coords="445,5,877,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="456,56,867,83"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="445,107,877,133"></map>
</div>

</div>
</div><p>
<a class="anchor" name="b2447c27c88ebb29511379ede8ac5b6f"></a><!-- doxytag: member="libdap::HTTPCache::set_max_size" ref="b2447c27c88ebb29511379ede8ac5b6f" args="(unsigned long size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::set_max_size           </td>
          <td>(</td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>size</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Cache size management. The default cache size is 20M. The minimum size is 5M in order not to get into weird problems while writing the cache. The size is indicated in Mega bytes. Note that reducing the size of the cache may trigger a garbage collection operation.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The maximum cache size is UINT_MAX bytes (usually 4294967295 for 32-bit computers). If <em>size</em> is larger the value will be truncated to the value of that constant. It seems pretty unlikely that will happen given that the parameter is an unsigned long. This is a fix for bug 689 which was reported when the parameter type was signed.</dd></dl>
This method locks the class' interface.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The maximum size of the cache in megabytes. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l00717">717</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCache_8cc_source.html#l00110">CACHE_FOLDER_PCT</a>, <a class="el" href="HTTPCache_8cc_source.html#l00111">CACHE_GC_PCT</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00404">libdap::HTTPCacheTable::cache_index_write()</a>, <a class="el" href="debug_8h_source.html#l00073">DBG2</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00108">MEGA</a>, <a class="el" href="HTTPCache_8cc_source.html#l00112">MIN_CACHE_TOTAL_SIZE</a>, and <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>.</p>

<p>Referenced by <a class="el" href="HTTPConnect_8cc_source.html#l00579">libdap::HTTPConnect::HTTPConnect()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_b2447c27c88ebb29511379ede8ac5b6f_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_b2447c27c88ebb29511379ede8ac5b6f_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_b2447c27c88ebb29511379ede8ac5b6f_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#7cd5a3a24fd0cd41ac0d9a3192075e9c" title="libdap::HTTPCacheTable::cache_index_write" alt="" coords="387,5,819,32"><area shape="rect" id="node5" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="397,56,808,83"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="387,107,819,133"></map>
</div>

</div>
</div><p>
<a class="anchor" name="5b6a28e17912e87389260f7695fdf876"></a><!-- doxytag: member="libdap::HTTPCache::unlock_cache_interface" ref="5b6a28e17912e87389260f7695fdf876" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::unlock_cache_interface           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="HTTPCache_8h_source.html#l00252">252</a> of file <a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>.</p>

<p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="debug_8h_source.html#l00059">DBGN</a>, and <a class="el" href="HTTPCache_8h_source.html#l00075">UNLOCK</a>.</p>

<p>Referenced by <a class="el" href="HTTPCache_8cc_source.html#l01143">cache_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01494">get_cached_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01236">get_conditional_request_headers()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01387">is_url_valid()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01612">purge_cache()</a>, <a class="el" href="HTTPCache_8cc_source.html#l01584">release_cached_response()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00866">set_cache_control()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00657">set_cache_disconnected()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00627">set_cache_enabled()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00813">set_default_expiration()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00683">set_expire_ignored()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00766">set_max_entry_size()</a>, <a class="el" href="HTTPCache_8cc_source.html#l00717">set_max_size()</a>, and <a class="el" href="HTTPCache_8cc_source.html#l01312">update_response()</a>.</p>

</div>
</div><p>
<a class="anchor" name="b0b1e3fb63084b93e277c53d189ad6c2"></a><!-- doxytag: member="libdap::HTTPCache::update_response" ref="b0b1e3fb63084b93e277c53d189ad6c2" args="(const string &amp;url, time_t request_time, const vector&lt; string &gt; &amp;headers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libdap::HTTPCache::update_response           </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&nbsp;</td>
          <td class="paramname"> <em>request_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>headers</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Update the meta data for a response already in the cache. This method provides a way to merge response headers returned from a conditional GET request, for the given URL, with those already present.<p>
This method locks the class' interface and the cache entry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>url</em>&nbsp;</td><td>Update the meta data for this cache entry. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>request_time</em>&nbsp;</td><td>The time (Unix time, seconds since 1 Jan 1970) that the conditional request was made. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>headers</em>&nbsp;</td><td>New headers, one header per string, returned in the response. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a></em>&nbsp;</td><td>Thrown if the <code>url</code> is not in the cache. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="HTTPCache_8cc_source.html#l01312">1312</a> of file <a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a>.</p>

<p>References <a class="el" href="HTTPCacheTable_8cc_source.html#l00740">libdap::HTTPCacheTable::calculate_time()</a>, <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00139">libdap::HTTPCacheTable::CacheEntry::get_cachename()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00605">libdap::HTTPCacheTable::get_write_locked_entry_from_cache_table()</a>, <a class="el" href="HTTPCache_8h_source.html#l00247">lock_cache_interface()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00783">libdap::HTTPCacheTable::parse_headers()</a>, <a class="el" href="HTTPCache_8h_source.html#l00252">unlock_cache_interface()</a>, <a class="el" href="HTTPCacheTable_8h_source.html#l00198">libdap::HTTPCacheTable::CacheEntry::unlock_read_response()</a>, and <a class="el" href="HTTPCacheTable_8h_source.html#l00214">libdap::HTTPCacheTable::CacheEntry::unlock_write_response()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="classlibdap_1_1HTTPCache_b0b1e3fb63084b93e277c53d189ad6c2_cgraph.png" border="0" usemap="#classlibdap_1_1HTTPCache_b0b1e3fb63084b93e277c53d189ad6c2_cgraph_map" alt=""></center>
<map name="classlibdap_1_1HTTPCache_b0b1e3fb63084b93e277c53d189ad6c2_cgraph_map">
<area shape="rect" id="node3" href="classlibdap_1_1HTTPCacheTable.html#0ca63c76e70064549d128ff8f5951534" title="libdap::HTTPCacheTable::calculate_time" alt="" coords="543,5,943,32"><area shape="rect" id="node5" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#78b388e7b644a3548a7d548550603fd9" title="libdap::HTTPCacheTable::CacheEntry::get_cachename" alt="" coords="487,56,999,83"><area shape="rect" id="node7" href="classlibdap_1_1HTTPCacheTable.html#57c01c8b9462f0e0ea6541b7d9fcf2f5" title="libdap::HTTPCacheTable::get_write_locked_entry_from_cache_table" alt="" coords="417,107,1068,133"><area shape="rect" id="node11" href="classlibdap_1_1HTTPCache.html#71ed87540113c4403a33bb436d3f8b9c" title="libdap::HTTPCache::lock_cache_interface" alt="" coords="537,157,948,184"><area shape="rect" id="node13" href="classlibdap_1_1HTTPCacheTable.html#53379f3151fe6b85e85c75c401a14963" title="libdap::HTTPCacheTable::parse_headers" alt="" coords="547,208,939,235"><area shape="rect" id="node19" href="classlibdap_1_1HTTPCache.html#5b6a28e17912e87389260f7695fdf876" title="libdap::HTTPCache::unlock_cache_interface" alt="" coords="527,259,959,285"><area shape="rect" id="node21" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#e2db6d25b27dd657dd0a2ef553e28246" title="libdap::HTTPCacheTable::CacheEntry::unlock_read_response" alt="" coords="452,309,1033,336"><area shape="rect" id="node23" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#0cddc0fbf4569c5e323e79c5ec098c22" title="libdap::HTTPCacheTable::CacheEntry::unlock_write_response" alt="" coords="447,360,1039,387"><area shape="rect" id="node9" href="namespacelibdap.html#68a16ef70e29c367dabd3cb5165c386a" title="libdap::get_hash" alt="" coords="1277,107,1459,133"><area shape="rect" id="node15" href="namespacelibdap.html#baf4e1a6a665dbfe9324b25ec9fa701a" title="libdap::parse_time" alt="" coords="1268,183,1468,209"><area shape="rect" id="node17" href="structlibdap_1_1HTTPCacheTable_1_1CacheEntry.html#112b8ac8aa541ca9a06af7de4d80fc03" title="libdap::HTTPCacheTable::CacheEntry::set_no_cache" alt="" coords="1117,233,1619,260"></map>
</div>

</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="99997995a5158687260499f88ea57f36"></a><!-- doxytag: member="libdap::HTTPCache::HTTPCacheInterruptHandler" ref="99997995a5158687260499f88ea57f36" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classlibdap_1_1HTTPCacheInterruptHandler.html">HTTPCacheInterruptHandler</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="HTTPCache_8h_source.html#l00176">176</a> of file <a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="76bd6ce419aad54c8c87e993f5bd11c9"></a><!-- doxytag: member="libdap::HTTPCache::HTTPCacheTest" ref="76bd6ce419aad54c8c87e993f5bd11c9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class HTTPCacheTest<code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="HTTPCache_8h_source.html#l00175">175</a> of file <a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="HTTPCache_8h_source.html">HTTPCache.h</a><li><a class="el" href="HTTPCache_8cc_source.html">HTTPCache.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 19:59:48 2009 for libdap++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>