jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="ref.css" type='text/css' /> |
| 5 | <link rel="first" href="ref.html" title='The httplib2 Library' /> |
| 6 | <link rel='contents' href='contents.html' title="Contents" /> |
| 7 | <link rel='last' href='about.html' title='About this document...' /> |
| 8 | <link rel='help' href='about.html' title='About this document...' /> |
| 9 | <link rel="next" href="response-objects.html" /> |
| 10 | <link rel="prev" href="http-objects.html" /> |
| 11 | <link rel="parent" href="module-httplib2.html" /> |
| 12 | <link rel="next" href="response-objects.html" /> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 13 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 14 | <meta name='aesop' content='information' /> |
| 15 | <title>1.1.2 Cache Objects</title> |
| 16 | </head> |
| 17 | <body> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 18 | <div class="navigation"> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 19 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 20 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 21 | <tr> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 22 | <td class='online-navigation'><a rel="prev" title="1.1.1 http Objects" |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 23 | href="http-objects.html"><img src='previous.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 24 | border='0' height='32' alt='Previous Page' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 25 | <td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive" |
| 26 | href="module-httplib2.html"><img src='up.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 27 | border='0' height='32' alt='Up one Level' width='32' /></a></td> |
| 28 | <td class='online-navigation'><a rel="next" title="1.1.3 response Objects" |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 29 | href="response-objects.html"><img src='next.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 30 | border='0' height='32' alt='Next Page' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 31 | <td align="center" width="100%">The httplib2 Library</td> |
| 32 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 33 | href="contents.html"><img src='contents.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 34 | border='0' height='32' alt='Contents' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 35 | <td class='online-navigation'><img src='blank.png' |
| 36 | border='0' height='32' alt='' width='32' /></td> |
| 37 | <td class='online-navigation'><img src='blank.png' |
| 38 | border='0' height='32' alt='' width='32' /></td> |
| 39 | </tr></table> |
| 40 | <div class='online-navigation'> |
| 41 | <b class="navlabel">Previous:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 42 | <a class="sectref" rel="prev" href="http-objects.html">1.1.1 Http Objects</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 43 | <b class="navlabel">Up:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 44 | <a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 45 | <b class="navlabel">Next:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 46 | <a class="sectref" rel="next" href="response-objects.html">1.1.3 Response Objects</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 47 | </div> |
| 48 | <hr /></div> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 49 | </div> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 50 | <!--End of Navigation Panel--> |
| 51 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 52 | <h2><a name="SECTION002120000000000000000"></a> |
| 53 | <a name="cache-objects"></a> |
| 54 | <br> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 55 | 1.1.2 Cache Objects |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 56 | </h2> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 57 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 58 | <p> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 59 | If you wish to supply your own caching implementation |
Joe Gregorio | 2676371 | 2013-02-19 15:57:37 -0500 | [diff] [blame] | 60 | then you will need to pass in an object that supports the |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 61 | following methods. Note that the <tt class="module">memcache</tt> module |
| 62 | supports this interface natively. |
| 63 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 64 | <p> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 65 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
joe.gregorio | ab704ef | 2007-10-23 15:26:12 +0000 | [diff] [blame] | 66 | <td><nobr><b><tt id='l2h-23' xml:id='l2h-23' class="method">get</tt></b>(</nobr></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 67 | <td><var>key</var>)</td></tr></table></dt> |
| 68 | <dd> |
| 69 | Takes a string <var>key</var> and returns the value as a string. |
| 70 | </dl> |
| 71 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 72 | <p> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 73 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
joe.gregorio | ab704ef | 2007-10-23 15:26:12 +0000 | [diff] [blame] | 74 | <td><nobr><b><tt id='l2h-24' xml:id='l2h-24' class="method">set</tt></b>(</nobr></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 75 | <td><var>key, value</var>)</td></tr></table></dt> |
| 76 | <dd> |
| 77 | Takes a string <var>key</var> and <var>value</var> and stores it in the cache. |
| 78 | </dl> |
| 79 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 80 | <p> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 81 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
joe.gregorio | ab704ef | 2007-10-23 15:26:12 +0000 | [diff] [blame] | 82 | <td><nobr><b><tt id='l2h-25' xml:id='l2h-25' class="method">delete</tt></b>(</nobr></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 83 | <td><var>key</var>)</td></tr></table></dt> |
| 84 | <dd> |
| 85 | Deletes the cached value stored at <var>key</var>. The value |
| 86 | of <var>key</var> is a string. |
| 87 | </dl> |
| 88 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 89 | <p> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 90 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 91 | <div class="navigation"> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 92 | <div class='online-navigation'> |
| 93 | <p></p><hr /> |
| 94 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 95 | <tr> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 96 | <td class='online-navigation'><a rel="prev" title="1.1.1 http Objects" |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 97 | href="http-objects.html"><img src='previous.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 98 | border='0' height='32' alt='Previous Page' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 99 | <td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive" |
| 100 | href="module-httplib2.html"><img src='up.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 101 | border='0' height='32' alt='Up one Level' width='32' /></a></td> |
| 102 | <td class='online-navigation'><a rel="next" title="1.1.3 response Objects" |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 103 | href="response-objects.html"><img src='next.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 104 | border='0' height='32' alt='Next Page' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 105 | <td align="center" width="100%">The httplib2 Library</td> |
| 106 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 107 | href="contents.html"><img src='contents.png' |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 108 | border='0' height='32' alt='Contents' width='32' /></a></td> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 109 | <td class='online-navigation'><img src='blank.png' |
| 110 | border='0' height='32' alt='' width='32' /></td> |
| 111 | <td class='online-navigation'><img src='blank.png' |
| 112 | border='0' height='32' alt='' width='32' /></td> |
| 113 | </tr></table> |
| 114 | <div class='online-navigation'> |
| 115 | <b class="navlabel">Previous:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 116 | <a class="sectref" rel="prev" href="http-objects.html">1.1.1 Http Objects</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 117 | <b class="navlabel">Up:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 118 | <a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 119 | <b class="navlabel">Next:</b> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 120 | <a class="sectref" rel="next" href="response-objects.html">1.1.3 Response Objects</a> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 121 | </div> |
| 122 | </div> |
| 123 | <hr /> |
jcgregorio | cde4f09 | 2007-03-08 21:59:04 +0000 | [diff] [blame] | 124 | <span class="release-info">Release 0.3, documentation updated on Mar 8, 2007.</span> |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 125 | </div> |
jcgregorio | 26c0cd7 | 2006-07-03 17:36:17 +0000 | [diff] [blame] | 126 | <!--End of Navigation Panel--> |
| 127 | |
jcgregorio | 88ada9a | 2007-05-03 13:20:38 +0000 | [diff] [blame] | 128 | </body> |
| 129 | </html> |