blob: 1ce96ea0c6c6444ecd33ad1af1eaceaa986e74e3 [file] [log] [blame]
jcgregorio26c0cd72006-07-03 17:36:17 +00001<!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" />
13<meta name='aesop' content='information' />
14<title>1.1.2 Cache Objects</title>
15</head>
16<body>
17<DIV CLASS="navigation">
18<div id='top-navigation-panel' xml:id='top-navigation-panel'>
19<table align="center" width="100%" cellpadding="0" cellspacing="2">
20<tr>
21<td class='online-navigation'><a rel="prev" title="1.1.1 Http Objects"
22 href="http-objects.html"><img src='previous.png'
23 border='0' height='32' alt='Previous Page' width='32' /></A></td>
24<td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive"
25 href="module-httplib2.html"><img src='up.png'
26 border='0' height='32' alt='Up One Level' width='32' /></A></td>
27<td class='online-navigation'><a rel="next" title="1.1.3 Response Objects"
28 href="response-objects.html"><img src='next.png'
29 border='0' height='32' alt='Next Page' width='32' /></A></td>
30<td align="center" width="100%">The httplib2 Library</td>
31<td class='online-navigation'><a rel="contents" title="Table of Contents"
32 href="contents.html"><img src='contents.png'
33 border='0' height='32' alt='Contents' width='32' /></A></td>
34<td class='online-navigation'><img src='blank.png'
35 border='0' height='32' alt='' width='32' /></td>
36<td class='online-navigation'><img src='blank.png'
37 border='0' height='32' alt='' width='32' /></td>
38</tr></table>
39<div class='online-navigation'>
40<b class="navlabel">Previous:</b>
41<a class="sectref" rel="prev" href="http-objects.html">1.1.1 Http Objects</A>
42<b class="navlabel">Up:</b>
43<a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</A>
44<b class="navlabel">Next:</b>
45<a class="sectref" rel="next" href="response-objects.html">1.1.3 Response Objects</A>
46</div>
47<hr /></div>
48</DIV>
49<!--End of Navigation Panel-->
50
51<H2><A NAME="SECTION002120000000000000000"></A>
52<A NAME="cache-objects"></A>
53<BR>
541.1.2 Cache Objects
55</H2>
56
57<P>
58If you wish to supply your own caching implementation
59then you will need to pass in an object that supports the
60following methods. Note that the <tt class="module">memcache</tt> module
61supports this interface natively.
62
63<P>
64<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
jcgregorioee542cc2006-11-16 04:43:19 +000065 <td><nobr><b><tt id='l2h-17' xml:id='l2h-17' class="method">get</tt></b>(</nobr></td>
jcgregorio26c0cd72006-07-03 17:36:17 +000066 <td><var>key</var>)</td></tr></table></dt>
67<dd>
68Takes a string <var>key</var> and returns the value as a string.
69</dl>
70
71<P>
72<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
jcgregorioee542cc2006-11-16 04:43:19 +000073 <td><nobr><b><tt id='l2h-18' xml:id='l2h-18' class="method">set</tt></b>(</nobr></td>
jcgregorio26c0cd72006-07-03 17:36:17 +000074 <td><var>key, value</var>)</td></tr></table></dt>
75<dd>
76Takes a string <var>key</var> and <var>value</var> and stores it in the cache.
77</dl>
78
79<P>
80<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
jcgregorioee542cc2006-11-16 04:43:19 +000081 <td><nobr><b><tt id='l2h-19' xml:id='l2h-19' class="method">delete</tt></b>(</nobr></td>
jcgregorio26c0cd72006-07-03 17:36:17 +000082 <td><var>key</var>)</td></tr></table></dt>
83<dd>
84Deletes the cached value stored at <var>key</var>. The value
85of <var>key</var> is a string.
86</dl>
87
88<P>
89
90<DIV CLASS="navigation">
91<div class='online-navigation'>
92<p></p><hr />
93<table align="center" width="100%" cellpadding="0" cellspacing="2">
94<tr>
95<td class='online-navigation'><a rel="prev" title="1.1.1 Http Objects"
96 href="http-objects.html"><img src='previous.png'
97 border='0' height='32' alt='Previous Page' width='32' /></A></td>
98<td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive"
99 href="module-httplib2.html"><img src='up.png'
100 border='0' height='32' alt='Up One Level' width='32' /></A></td>
101<td class='online-navigation'><a rel="next" title="1.1.3 Response Objects"
102 href="response-objects.html"><img src='next.png'
103 border='0' height='32' alt='Next Page' width='32' /></A></td>
104<td align="center" width="100%">The httplib2 Library</td>
105<td class='online-navigation'><a rel="contents" title="Table of Contents"
106 href="contents.html"><img src='contents.png'
107 border='0' height='32' alt='Contents' width='32' /></A></td>
108<td class='online-navigation'><img src='blank.png'
109 border='0' height='32' alt='' width='32' /></td>
110<td class='online-navigation'><img src='blank.png'
111 border='0' height='32' alt='' width='32' /></td>
112</tr></table>
113<div class='online-navigation'>
114<b class="navlabel">Previous:</b>
115<a class="sectref" rel="prev" href="http-objects.html">1.1.1 Http Objects</A>
116<b class="navlabel">Up:</b>
117<a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</A>
118<b class="navlabel">Next:</b>
119<a class="sectref" rel="next" href="response-objects.html">1.1.3 Response Objects</A>
120</div>
121</div>
122<hr />
123<span class="release-info">Release 0.2, documentation updated on July 2, 2006.</span>
124</DIV>
125<!--End of Navigation Panel-->
126
127</BODY>
128</HTML>