1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>googleapiclient.discovery_cache.file_cache</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33      <th class="navbar" width="100%"></th>
34  </tr>
35</table>
36<table width="100%" cellpadding="0" cellspacing="0">
37  <tr valign="top">
38    <td width="100%">
39      <span class="breadcrumbs">
40        <a href="googleapiclient-module.html">Package&nbsp;googleapiclient</a> ::
41        <a href="googleapiclient.discovery_cache-module.html">Package&nbsp;discovery_cache</a> ::
42        Module&nbsp;file_cache
43      </span>
44    </td>
45    <td>
46      <table cellpadding="0" cellspacing="0">
47        <!-- hide/show private -->
48        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
49    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
50        <tr><td align="right"><span class="options"
51            >[<a href="frames.html" target="_top">frames</a
52            >]&nbsp;|&nbsp;<a href="googleapiclient.discovery_cache.file_cache-module.html"
53            target="_top">no&nbsp;frames</a>]</span></td></tr>
54      </table>
55    </td>
56  </tr>
57</table>
58<!-- ==================== MODULE DESCRIPTION ==================== -->
59<h1 class="epydoc">Module file_cache</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.discovery_cache.file_cache-pysrc.html">source&nbsp;code</a></span></p>
60<pre class="literalblock">
61File based cache for the discovery document.
62
63The cache is stored in a single file so that multiple processes can
64share the same cache. It locks the file whenever accesing to the
65file. When the cache content is corrupted, it will be initialized with
66an empty cache.
67
68</pre>
69
70<!-- ==================== CLASSES ==================== -->
71<a name="section-Classes"></a>
72<table class="summary" border="1" cellpadding="3"
73       cellspacing="0" width="100%" bgcolor="white">
74<tr bgcolor="#70b0f0" class="table-header">
75  <td colspan="2" class="table-header">
76    <table border="0" cellpadding="0" cellspacing="0" width="100%">
77      <tr valign="top">
78        <td align="left"><span class="table-header">Classes</span></td>
79        <td align="right" valign="top"
80         ><span class="options">[<a href="#section-Classes"
81         class="privatelink" onclick="toggle_private();"
82         >hide private</a>]</span></td>
83      </tr>
84    </table>
85  </td>
86</tr>
87<tr>
88    <td width="15%" align="right" valign="top" class="summary">
89      <span class="summary-type">&nbsp;</span>
90    </td><td class="summary">
91        <a href="googleapiclient.discovery_cache.file_cache.Cache-class.html" class="summary-name">Cache</a><br />
92      A file based cache for the discovery documents.
93    </td>
94  </tr>
95</table>
96<!-- ==================== FUNCTIONS ==================== -->
97<a name="section-Functions"></a>
98<table class="summary" border="1" cellpadding="3"
99       cellspacing="0" width="100%" bgcolor="white">
100<tr bgcolor="#70b0f0" class="table-header">
101  <td colspan="2" class="table-header">
102    <table border="0" cellpadding="0" cellspacing="0" width="100%">
103      <tr valign="top">
104        <td align="left"><span class="table-header">Functions</span></td>
105        <td align="right" valign="top"
106         ><span class="options">[<a href="#section-Functions"
107         class="privatelink" onclick="toggle_private();"
108         >hide private</a>]</span></td>
109      </tr>
110    </table>
111  </td>
112</tr>
113<tr class="private">
114    <td width="15%" align="right" valign="top" class="summary">
115      <span class="summary-type">&nbsp;</span>
116    </td><td class="summary">
117      <table width="100%" cellpadding="0" cellspacing="0" border="0">
118        <tr>
119          <td><span class="summary-sig"><a name="_to_timestamp"></a><span class="summary-sig-name">_to_timestamp</span>(<span class="summary-sig-arg">date</span>)</span></td>
120          <td align="right" valign="top">
121            <span class="codelink"><a href="googleapiclient.discovery_cache.file_cache-pysrc.html#_to_timestamp">source&nbsp;code</a></span>
122
123          </td>
124        </tr>
125      </table>
126
127    </td>
128  </tr>
129<tr class="private">
130    <td width="15%" align="right" valign="top" class="summary">
131      <span class="summary-type">&nbsp;</span>
132    </td><td class="summary">
133      <table width="100%" cellpadding="0" cellspacing="0" border="0">
134        <tr>
135          <td><span class="summary-sig"><a name="_read_or_initialize_cache"></a><span class="summary-sig-name">_read_or_initialize_cache</span>(<span class="summary-sig-arg">f</span>)</span></td>
136          <td align="right" valign="top">
137            <span class="codelink"><a href="googleapiclient.discovery_cache.file_cache-pysrc.html#_read_or_initialize_cache">source&nbsp;code</a></span>
138
139          </td>
140        </tr>
141      </table>
142
143    </td>
144  </tr>
145</table>
146<!-- ==================== VARIABLES ==================== -->
147<a name="section-Variables"></a>
148<table class="summary" border="1" cellpadding="3"
149       cellspacing="0" width="100%" bgcolor="white">
150<tr bgcolor="#70b0f0" class="table-header">
151  <td colspan="2" class="table-header">
152    <table border="0" cellpadding="0" cellspacing="0" width="100%">
153      <tr valign="top">
154        <td align="left"><span class="table-header">Variables</span></td>
155        <td align="right" valign="top"
156         ><span class="options">[<a href="#section-Variables"
157         class="privatelink" onclick="toggle_private();"
158         >hide private</a>]</span></td>
159      </tr>
160    </table>
161  </td>
162</tr>
163<tr>
164    <td width="15%" align="right" valign="top" class="summary">
165      <span class="summary-type">&nbsp;</span>
166    </td><td class="summary">
167        <a name="LOGGER"></a><span class="summary-name">LOGGER</span> = <code title="logging.getLogger(__name__)">logging.getLogger(__name__)</code>
168    </td>
169  </tr>
170<tr>
171    <td width="15%" align="right" valign="top" class="summary">
172      <span class="summary-type">&nbsp;</span>
173    </td><td class="summary">
174        <a name="FILENAME"></a><span class="summary-name">FILENAME</span> = <code title="'google-api-python-client-discovery-doc.cache'">'google-api-python-client-discovery-doc.cache'</code>
175    </td>
176  </tr>
177<tr>
178    <td width="15%" align="right" valign="top" class="summary">
179      <span class="summary-type">&nbsp;</span>
180    </td><td class="summary">
181        <a name="EPOCH"></a><span class="summary-name">EPOCH</span> = <code title="datetime.datetime.utcfromtimestamp(0)">datetime.datetime.utcfromtimestamp(0)</code>
182    </td>
183  </tr>
184<tr>
185    <td width="15%" align="right" valign="top" class="summary">
186      <span class="summary-type">&nbsp;</span>
187    </td><td class="summary">
188        <a name="cache"></a><span class="summary-name">cache</span> = <code title="Cache(max_age= DISCOVERY_DOC_MAX_AGE)">Cache(max_age= DISCOVERY_DOC_MAX_AGE)</code>
189    </td>
190  </tr>
191</table>
192<!-- ==================== NAVIGATION BAR ==================== -->
193<table class="navbar" border="0" width="100%" cellpadding="0"
194       bgcolor="#a0c0ff" cellspacing="0">
195  <tr valign="middle">
196  <!-- Home link -->
197      <th>&nbsp;&nbsp;&nbsp;<a
198        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
199
200  <!-- Tree link -->
201      <th>&nbsp;&nbsp;&nbsp;<a
202        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
203
204  <!-- Index link -->
205      <th>&nbsp;&nbsp;&nbsp;<a
206        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
207
208  <!-- Help link -->
209      <th>&nbsp;&nbsp;&nbsp;<a
210        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
211
212      <th class="navbar" width="100%"></th>
213  </tr>
214</table>
215<table border="0" cellpadding="0" cellspacing="0" width="100%%">
216  <tr>
217    <td align="left" class="footer">
218    Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:27 2019
219    </td>
220    <td align="right" class="footer">
221      <a target="mainFrame" href="http://epydoc.sourceforge.net"
222        >http://epydoc.sourceforge.net</a>
223    </td>
224  </tr>
225</table>
226
227<script type="text/javascript">
228  <!--
229  // Private objects are initially displayed (because if
230  // javascript is turned off then we want them to be
231  // visible); but by default, we want to hide them.  So hide
232  // them unless we have a cookie that says to show them.
233  checkCookie();
234  // -->
235</script>
236</body>
237</html>
238