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.appengine_memcache.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> <a 19 href="googleapiclient-module.html">Home</a> </th> 20 21 <!-- Tree link --> 22 <th> <a 23 href="module-tree.html">Trees</a> </th> 24 25 <!-- Index link --> 26 <th> <a 27 href="identifier-index.html">Indices</a> </th> 28 29 <!-- Help link --> 30 <th> <a 31 href="help.html">Help</a> </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 googleapiclient</a> :: 41 <a href="googleapiclient.discovery_cache-module.html">Package discovery_cache</a> :: 42 <a href="googleapiclient.discovery_cache.appengine_memcache-module.html">Module appengine_memcache</a> :: 43 Class Cache 44 </span> 45 </td> 46 <td> 47 <table cellpadding="0" cellspacing="0"> 48 <!-- hide/show private --> 49 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" 50 onclick="toggle_private();">hide private</a>]</span></td></tr> 51 <tr><td align="right"><span class="options" 52 >[<a href="frames.html" target="_top">frames</a 53 >] | <a href="googleapiclient.discovery_cache.appengine_memcache.Cache-class.html" 54 target="_top">no frames</a>]</span></td></tr> 55 </table> 56 </td> 57 </tr> 58</table> 59<!-- ==================== CLASS DESCRIPTION ==================== --> 60<h1 class="epydoc">Class Cache</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache">source code</a></span></p> 61<center> 62 63</center> 64<hr /> 65<pre class="literalblock"> 66A cache with app engine memcache API. 67 68</pre> 69 70<!-- ==================== INSTANCE METHODS ==================== --> 71<a name="section-InstanceMethods"></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">Instance Methods</span></td> 79 <td align="right" valign="top" 80 ><span class="options">[<a href="#section-InstanceMethods" 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"> </span> 90 </td><td class="summary"> 91 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 92 <tr> 93 <td><span class="summary-sig"><a href="googleapiclient.discovery_cache.appengine_memcache.Cache-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, 94 <span class="summary-sig-arg">max_age</span>)</span><br /> 95 Constructor.</td> 96 <td align="right" valign="top"> 97 <span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.__init__">source code</a></span> 98 99 </td> 100 </tr> 101 </table> 102 103 </td> 104 </tr> 105<tr> 106 <td width="15%" align="right" valign="top" class="summary"> 107 <span class="summary-type"> </span> 108 </td><td class="summary"> 109 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 110 <tr> 111 <td><span class="summary-sig"><a href="googleapiclient.discovery_cache.appengine_memcache.Cache-class.html#get" class="summary-sig-name">get</a>(<span class="summary-sig-arg">self</span>, 112 <span class="summary-sig-arg">url</span>)</span><br /> 113 Gets the content from the memcache with a given key.</td> 114 <td align="right" valign="top"> 115 <span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.get">source code</a></span> 116 117 </td> 118 </tr> 119 </table> 120 121 </td> 122 </tr> 123<tr> 124 <td width="15%" align="right" valign="top" class="summary"> 125 <span class="summary-type"> </span> 126 </td><td class="summary"> 127 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 128 <tr> 129 <td><span class="summary-sig"><a href="googleapiclient.discovery_cache.appengine_memcache.Cache-class.html#set" class="summary-sig-name">set</a>(<span class="summary-sig-arg">self</span>, 130 <span class="summary-sig-arg">url</span>, 131 <span class="summary-sig-arg">content</span>)</span><br /> 132 Sets the given key and content in the cache.</td> 133 <td align="right" valign="top"> 134 <span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.set">source code</a></span> 135 136 </td> 137 </tr> 138 </table> 139 140 </td> 141 </tr> 142 <tr> 143 <td colspan="2" class="summary"> 144 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 145 <code>__delattr__</code>, 146 <code>__format__</code>, 147 <code>__getattribute__</code>, 148 <code>__hash__</code>, 149 <code>__new__</code>, 150 <code>__reduce__</code>, 151 <code>__reduce_ex__</code>, 152 <code>__repr__</code>, 153 <code>__setattr__</code>, 154 <code>__sizeof__</code>, 155 <code>__str__</code>, 156 <code>__subclasshook__</code> 157 </p> 158 </td> 159 </tr> 160</table> 161<!-- ==================== CLASS VARIABLES ==================== --> 162<a name="section-ClassVariables"></a> 163<table class="summary" border="1" cellpadding="3" 164 cellspacing="0" width="100%" bgcolor="white"> 165<tr bgcolor="#70b0f0" class="table-header"> 166 <td colspan="2" class="table-header"> 167 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 168 <tr valign="top"> 169 <td align="left"><span class="table-header">Class Variables</span></td> 170 <td align="right" valign="top" 171 ><span class="options">[<a href="#section-ClassVariables" 172 class="privatelink" onclick="toggle_private();" 173 >hide private</a>]</span></td> 174 </tr> 175 </table> 176 </td> 177</tr> 178 <tr> 179 <td colspan="2" class="summary"> 180 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.discovery_cache.base.Cache-class.html">base.Cache</a></code></b>: 181 <code><a href="googleapiclient.discovery_cache.base.Cache-class.html#__metaclass__">__metaclass__</a></code> 182 </p> 183 </td> 184 </tr> 185</table> 186<!-- ==================== PROPERTIES ==================== --> 187<a name="section-Properties"></a> 188<table class="summary" border="1" cellpadding="3" 189 cellspacing="0" width="100%" bgcolor="white"> 190<tr bgcolor="#70b0f0" class="table-header"> 191 <td colspan="2" class="table-header"> 192 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 193 <tr valign="top"> 194 <td align="left"><span class="table-header">Properties</span></td> 195 <td align="right" valign="top" 196 ><span class="options">[<a href="#section-Properties" 197 class="privatelink" onclick="toggle_private();" 198 >hide private</a>]</span></td> 199 </tr> 200 </table> 201 </td> 202</tr> 203 <tr> 204 <td colspan="2" class="summary"> 205 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 206 <code>__class__</code> 207 </p> 208 </td> 209 </tr> 210</table> 211<!-- ==================== METHOD DETAILS ==================== --> 212<a name="section-MethodDetails"></a> 213<table class="details" border="1" cellpadding="3" 214 cellspacing="0" width="100%" bgcolor="white"> 215<tr bgcolor="#70b0f0" class="table-header"> 216 <td colspan="2" class="table-header"> 217 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 218 <tr valign="top"> 219 <td align="left"><span class="table-header">Method Details</span></td> 220 <td align="right" valign="top" 221 ><span class="options">[<a href="#section-MethodDetails" 222 class="privatelink" onclick="toggle_private();" 223 >hide private</a>]</span></td> 224 </tr> 225 </table> 226 </td> 227</tr> 228</table> 229<a name="__init__"></a> 230<div> 231<table class="details" border="1" cellpadding="3" 232 cellspacing="0" width="100%" bgcolor="white"> 233<tr><td> 234 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 235 <tr valign="top"><td> 236 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, 237 <span class="sig-arg">max_age</span>)</span> 238 <br /><em class="fname">(Constructor)</em> 239 </h3> 240 </td><td align="right" valign="top" 241 ><span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.__init__">source code</a></span> 242 </td> 243 </tr></table> 244 245 <pre class="literalblock"> 246Constructor. 247 248Args: 249 max_age: Cache expiration in seconds. 250 251</pre> 252 <dl class="fields"> 253 <dt>Overrides: 254 object.__init__ 255 </dt> 256 </dl> 257</td></tr></table> 258</div> 259<a name="get"></a> 260<div> 261<table class="details" border="1" cellpadding="3" 262 cellspacing="0" width="100%" bgcolor="white"> 263<tr><td> 264 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 265 <tr valign="top"><td> 266 <h3 class="epydoc"><span class="sig"><span class="sig-name">get</span>(<span class="sig-arg">self</span>, 267 <span class="sig-arg">url</span>)</span> 268 </h3> 269 </td><td align="right" valign="top" 270 ><span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.get">source code</a></span> 271 </td> 272 </tr></table> 273 274 <pre class="literalblock"> 275Gets the content from the memcache with a given key. 276 277Args: 278 url: string, the key for the cache. 279 280Returns: 281 object, the value in the cache for the given key, or None if the key is 282 not in the cache. 283 284</pre> 285 <dl class="fields"> 286 <dt>Overrides: 287 <a href="googleapiclient.discovery_cache.base.Cache-class.html#get">base.Cache.get</a> 288 <dd><em class="note">(inherited documentation)</em></dd> 289 </dt> 290 </dl> 291</td></tr></table> 292</div> 293<a name="set"></a> 294<div> 295<table class="details" border="1" cellpadding="3" 296 cellspacing="0" width="100%" bgcolor="white"> 297<tr><td> 298 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 299 <tr valign="top"><td> 300 <h3 class="epydoc"><span class="sig"><span class="sig-name">set</span>(<span class="sig-arg">self</span>, 301 <span class="sig-arg">url</span>, 302 <span class="sig-arg">content</span>)</span> 303 </h3> 304 </td><td align="right" valign="top" 305 ><span class="codelink"><a href="googleapiclient.discovery_cache.appengine_memcache-pysrc.html#Cache.set">source code</a></span> 306 </td> 307 </tr></table> 308 309 <pre class="literalblock"> 310Sets the given key and content in the cache. 311 312Args: 313 url: string, the key for the cache. 314 content: string, the discovery document. 315 316</pre> 317 <dl class="fields"> 318 <dt>Overrides: 319 <a href="googleapiclient.discovery_cache.base.Cache-class.html#set">base.Cache.set</a> 320 <dd><em class="note">(inherited documentation)</em></dd> 321 </dt> 322 </dl> 323</td></tr></table> 324</div> 325<br /> 326<!-- ==================== NAVIGATION BAR ==================== --> 327<table class="navbar" border="0" width="100%" cellpadding="0" 328 bgcolor="#a0c0ff" cellspacing="0"> 329 <tr valign="middle"> 330 <!-- Home link --> 331 <th> <a 332 href="googleapiclient-module.html">Home</a> </th> 333 334 <!-- Tree link --> 335 <th> <a 336 href="module-tree.html">Trees</a> </th> 337 338 <!-- Index link --> 339 <th> <a 340 href="identifier-index.html">Indices</a> </th> 341 342 <!-- Help link --> 343 <th> <a 344 href="help.html">Help</a> </th> 345 346 <th class="navbar" width="100%"></th> 347 </tr> 348</table> 349<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 350 <tr> 351 <td align="left" class="footer"> 352 Generated by Epydoc 3.0.1 on Mon Jun 5 13:38:39 2017 353 </td> 354 <td align="right" class="footer"> 355 <a target="mainFrame" href="http://epydoc.sourceforge.net" 356 >http://epydoc.sourceforge.net</a> 357 </td> 358 </tr> 359</table> 360 361<script type="text/javascript"> 362 <!-- 363 // Private objects are initially displayed (because if 364 // javascript is turned off then we want them to be 365 // visible); but by default, we want to hide them. So hide 366 // them unless we have a cookie that says to show them. 367 checkCookie(); 368 // --> 369</script> 370</body> 371</html> 372