<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libdap++: HTTPCacheTable.cc File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libdap++ <span id="projectnumber">Updated for version 3.8.2</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('HTTPCacheTable_8cc.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#namespaces">Namespaces</a> | <a href="#define-members">Defines</a> | <a href="#func-members">Functions</a> | <a href="#var-members">Variables</a> </div> <div class="headertitle"> <h1>HTTPCacheTable.cc File Reference</h1> </div> </div> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="config_8h_source.html">config.h</a>"</code><br/> <code>#include <pthread.h></code><br/> <code>#include <limits.h></code><br/> <code>#include <unistd.h></code><br/> <code>#include <sys/types.h></code><br/> <code>#include <sys/stat.h></code><br/> <code>#include <cstring></code><br/> <code>#include <iostream></code><br/> <code>#include <sstream></code><br/> <code>#include <algorithm></code><br/> <code>#include <iterator></code><br/> <code>#include <set></code><br/> <code>#include "<a class="el" href="Error_8h_source.html">Error.h</a>"</code><br/> <code>#include "<a class="el" href="InternalErr_8h_source.html">InternalErr.h</a>"</code><br/> <code>#include "<a class="el" href="ResponseTooBigErr_8h_source.html">ResponseTooBigErr.h</a>"</code><br/> <code>#include "<a class="el" href="SignalHandler_8h_source.html">SignalHandler.h</a>"</code><br/> <code>#include "<a class="el" href="HTTPCacheInterruptHandler_8h_source.html">HTTPCacheInterruptHandler.h</a>"</code><br/> <code>#include "<a class="el" href="HTTPCacheTable_8h_source.html">HTTPCacheTable.h</a>"</code><br/> <code>#include "<a class="el" href="util__mit_8h_source.html">util_mit.h</a>"</code><br/> <code>#include "<a class="el" href="debug_8h_source.html">debug.h</a>"</code><br/> </div><div class="textblock"><div class="dynheader"> Include dependency graph for HTTPCacheTable.cc:</div> <div class="dyncontent"> <div class="center"><img src="HTTPCacheTable_8cc__incl.png" border="0" usemap="#HTTPCacheTable_8cc" alt=""/></div> <map name="HTTPCacheTable_8cc" id="HTTPCacheTable_8cc"> <area shape="rect" id="node3" href="config_8h.html" title="config.h" alt="" coords="5,80,107,107"/><area shape="rect" id="node27" href="Error_8h.html" title="Error.h" alt="" coords="724,379,815,405"/><area shape="rect" id="node34" href="InternalErr_8h.html" title="InternalErr.h" alt="" coords="444,304,596,331"/><area shape="rect" id="node38" href="ResponseTooBigErr_8h.html" title="ResponseTooBigErr.h" alt="" coords="181,229,392,256"/><area shape="rect" id="node42" href="SignalHandler_8h.html" title="SignalHandler.h" alt="" coords="1005,80,1176,107"/><area shape="rect" id="node50" href="HTTPCacheInterruptHandler_8h.html" title="HTTPCacheInterruptHandler.h" alt="" coords="1357,80,1648,107"/><area shape="rect" id="node65" href="HTTPCacheTable_8h.html" title="HTTPCacheTable.h" alt="" coords="771,229,952,256"/><area shape="rect" id="node73" href="debug_8h.html" title="debug.h" alt="" coords="1439,304,1529,331"/><area shape="rect" id="node88" href="util__mit_8h.html" title="util_mit.h" alt="" coords="108,379,231,405"/><area shape="rect" id="node46" href="EventHandler_8h.html" title="EventHandler.h" alt="" coords="1357,155,1520,181"/><area shape="rect" id="node57" href="HTTPCache_8h.html" title="HTTPCache.h" alt="" coords="1025,155,1156,181"/><area shape="rect" id="node79" href="HTTPCacheDisconnectedMode_8h.html" title="HTTPCacheDisconnectedMode.h" alt="" coords="1179,229,1469,256"/><area shape="rect" id="node81" href="SignalHandlerRegisteredErr_8h.html" title="SignalHandlerRegisteredErr.h" alt="" coords="1089,304,1391,331"/></map> </div> </div> <p><a href="HTTPCacheTable_8cc_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="namespaces"></a> Namespaces</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacelibdap.html">libdap</a></td></tr> <tr><td colspan="2"><h2><a name="define-members"></a> Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a69b733628460a6923e506281cd95c43f">CACHE_EMPTY_ETAG</a>   "@cache@"</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a2fcbe1f1875c3c4b38a63ea99b906c49">CACHE_INDEX</a>   ".index"</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a9f34e7ee25eb923739b1ea126dce4528">CACHE_META</a>   ".meta"</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a1d22fde6e7501aebedb7663f0b0aa4e2">DIR_SEPARATOR_CHAR</a>   '/'</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a23e72ca2d8456a971c13441bdfc4586f">DIR_SEPARATOR_STR</a>   "/"</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#ac34ecfc4f379afa6b7cbcf41c7781d0d">LM_EXPIRATION</a>(t)   (min((MAX_LM_EXPIRATION), static_cast<int>((t) / 10)))</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#aedf844327e904ce70cf4112a5d9fc334">MAX_LM_EXPIRATION</a>   48*3600</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a2bf44344e285663ad0b0b7bb001ac4fd">MKDIR</a>(a, b)   mkdir((a), (b))</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#ae76603c1b2ef94cb2664dbad1b82a4c6">MKSTEMP</a>(a)   mkstemp((a))</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#afefcb1315dce44b5c9459b8f0ad22cb7">NO_LM_EXPIRATION</a>   24*3600</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a2a6edcee170a79b132872d22066754ed">REMOVE</a>(a)   remove((a))</td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacelibdap.html#a68a16ef70e29c367dabd3cb5165c386a">libdap::get_hash</a> (const string &url)</td></tr> <tr><td colspan="2"><h2><a name="var-members"></a> Variables</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const int </td><td class="memItemRight" valign="bottom"><a class="el" href="HTTPCacheTable_8cc.html#a17929d1ac6258253df584173f0c6e279">CACHE_TABLE_SIZE</a> = 1499</td></tr> </table> <hr/><h2>Define Documentation</h2> <a class="anchor" id="a69b733628460a6923e506281cd95c43f"></a><!-- doxytag: member="HTTPCacheTable.cc::CACHE_EMPTY_ETAG" ref="a69b733628460a6923e506281cd95c43f" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define CACHE_EMPTY_ETAG   "@cache@"</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00076">76</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00327">libdap::HTTPCacheTable::cache_index_parse_line()</a>.</p> </div> </div> <a class="anchor" id="a2fcbe1f1875c3c4b38a63ea99b906c49"></a><!-- doxytag: member="HTTPCacheTable.cc::CACHE_INDEX" ref="a2fcbe1f1875c3c4b38a63ea99b906c49" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define CACHE_INDEX   ".index"</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00075">75</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00107">libdap::HTTPCacheTable::HTTPCacheTable()</a>.</p> </div> </div> <a class="anchor" id="a9f34e7ee25eb923739b1ea126dce4528"></a><!-- doxytag: member="HTTPCacheTable.cc::CACHE_META" ref="a9f34e7ee25eb923739b1ea126dce4528" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define CACHE_META   ".meta"</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00074">74</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00622">libdap::HTTPCacheTable::remove_cache_entry()</a>.</p> </div> </div> <a class="anchor" id="a1d22fde6e7501aebedb7663f0b0aa4e2"></a><!-- doxytag: member="HTTPCacheTable.cc::DIR_SEPARATOR_CHAR" ref="a1d22fde6e7501aebedb7663f0b0aa4e2" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define DIR_SEPARATOR_CHAR   '/'</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00070">70</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> </div> </div> <a class="anchor" id="a23e72ca2d8456a971c13441bdfc4586f"></a><!-- doxytag: member="HTTPCacheTable.cc::DIR_SEPARATOR_STR" ref="a23e72ca2d8456a971c13441bdfc4586f" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define DIR_SEPARATOR_STR   "/"</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00071">71</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> </div> </div> <a class="anchor" id="ac34ecfc4f379afa6b7cbcf41c7781d0d"></a><!-- doxytag: member="HTTPCacheTable.cc::LM_EXPIRATION" ref="ac34ecfc4f379afa6b7cbcf41c7781d0d" args="(t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define LM_EXPIRATION</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">t</td><td>)</td> <td>   (min((MAX_LM_EXPIRATION), static_cast<int>((t) / 10)))</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00084">84</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00728">libdap::HTTPCacheTable::calculate_time()</a>.</p> </div> </div> <a class="anchor" id="aedf844327e904ce70cf4112a5d9fc334"></a><!-- doxytag: member="HTTPCacheTable.cc::MAX_LM_EXPIRATION" ref="aedf844327e904ce70cf4112a5d9fc334" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MAX_LM_EXPIRATION   48*3600</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00079">79</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> </div> </div> <a class="anchor" id="a2bf44344e285663ad0b0b7bb001ac4fd"></a><!-- doxytag: member="HTTPCacheTable.cc::MKDIR" ref="a2bf44344e285663ad0b0b7bb001ac4fd" args="(a, b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MKDIR</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">a, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">b </td> </tr> <tr> <td></td> <td>)</td> <td></td><td>   mkdir((a), (b))</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00067">67</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00443">libdap::HTTPCacheTable::create_hash_directory()</a>.</p> </div> </div> <a class="anchor" id="ae76603c1b2ef94cb2664dbad1b82a4c6"></a><!-- doxytag: member="HTTPCacheTable.cc::MKSTEMP" ref="ae76603c1b2ef94cb2664dbad1b82a4c6" args="(a)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MKSTEMP</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">a</td><td>)</td> <td>   mkstemp((a))</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00069">69</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00481">libdap::HTTPCacheTable::create_location()</a>.</p> </div> </div> <a class="anchor" id="afefcb1315dce44b5c9459b8f0ad22cb7"></a><!-- doxytag: member="HTTPCacheTable.cc::NO_LM_EXPIRATION" ref="afefcb1315dce44b5c9459b8f0ad22cb7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define NO_LM_EXPIRATION   24*3600</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00078">78</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> </div> </div> <a class="anchor" id="a2a6edcee170a79b132872d22066754ed"></a><!-- doxytag: member="HTTPCacheTable.cc::REMOVE" ref="a2a6edcee170a79b132872d22066754ed" args="(a)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define REMOVE</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">a</td><td>)</td> <td>   remove((a))</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00068">68</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00278">libdap::HTTPCacheTable::cache_index_delete()</a>, and <a class="el" href="HTTPCacheTable_8cc_source.html#l00622">libdap::HTTPCacheTable::remove_cache_entry()</a>.</p> </div> </div> <hr/><h2>Variable Documentation</h2> <a class="anchor" id="a17929d1ac6258253df584173f0c6e279"></a><!-- doxytag: member="HTTPCacheTable.cc::CACHE_TABLE_SIZE" ref="a17929d1ac6258253df584173f0c6e279" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="HTTPCacheTable_8cc.html#a17929d1ac6258253df584173f0c6e279">CACHE_TABLE_SIZE</a> = 1499</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="HTTPCacheTable_8cc_source.html#l00087">87</a> of file <a class="el" href="HTTPCacheTable_8cc_source.html">HTTPCacheTable.cc</a>.</p> <p>Referenced by <a class="el" href="HTTPCacheTable_8cc_source.html#l00398">libdap::HTTPCacheTable::cache_index_write()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00699">libdap::HTTPCacheTable::delete_all_entries()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00216">libdap::HTTPCacheTable::delete_by_hits()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00251">libdap::HTTPCacheTable::delete_by_size()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00179">libdap::HTTPCacheTable::delete_expired_entries()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00097">libdap::get_hash()</a>, <a class="el" href="HTTPCacheTable_8cc_source.html#l00107">libdap::HTTPCacheTable::HTTPCacheTable()</a>, and <a class="el" href="HTTPCacheTable_8cc_source.html#l00134">libdap::HTTPCacheTable::~HTTPCacheTable()</a>.</p> </div> </div> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="HTTPCacheTable_8cc.html">HTTPCacheTable.cc</a> </li> <li class="footer">Generated on Tue Feb 8 2011 for libdap++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>