File: module-sqlobject.cache-index.html

package info (click to toggle)
sqlobject 3.1.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,280 kB
  • ctags: 17,912
  • sloc: python: 16,713; sh: 18; makefile: 13
file content (271 lines) | stat: -rw-r--r-- 9,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>Index of sqlobject.cache module</title>
    <link href="layout.css" type="text/css" rel="stylesheet">
  </head>
  <body>
    <div id="page">
      <h1 class="doc-title"><a></a></h1>
      <div id="navcontainer">
		    <ul id="navlist">
          <li class="pagenav">
            <ul>
              <li class="page_item">
                <a href="index.html" title="Project Home / Index">SQLObject</a>
              </li>
              <li class="page_item">
                <a href="module-index.html" title="sqlobject package and module reference">Modules</a>
              </li>
              <li>
                <a href="community.html" title="Mailing List">Discuss</a>
              </li>
	      <li>
	        <a href="SQLObject.html">Documentation</a>
	      </li>
            </ul>
          </li>
        </ul>
      </div>
      <hr>
      <div id="content">
  <h1>Index of the <tt>cache</tt> module</h1>
  <ul class="pudge-module-index">
    <li class="module">
    <span class="prefix">m</span>
    <a href="module-sqlobject.cache.html">
      <tt>sqlobject.cache</tt>
    </a>
    <a href="sqlobject/cache.py.html">...</a>
    <small>
      - <span class="rst">This implements the instance caching in SQLObject.  Caching is
relatively aggressive.  All objects are retained so long as they are
in memory, by keeping weak references to objects.  We also keep other
objects in a cache that doesn't allow them to be garbage collected
(unless caching is turned off).</span>
  </small>
    <ul>
      <li class="attribute">
    <span class="prefix">a</span>
    <a href="module-sqlobject.cache.html#__package__">
      <tt>__package__</tt>
    </a>
    <a href="sqlobject/cache.py.html">...</a>
    <small></small>
  </li>
      <li class="class">
    <span class="prefix">C</span>
    <a href="class-sqlobject.cache.CacheFactory.html">
      <tt>CacheFactory</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=13&amp;l=280#13">...</a>
    <small>
      - <span class="rst">CacheFactory caches object creation.  Each object should be
referenced by a single hashable ID (note tuples of hashable
values are also hashable).</span>
  </small>
    <ul>
      <li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#cull">
      <tt>cull</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=182&amp;l=214#182">...</a>
    <small>
      - <span class="rst">Runs through the cache and expires objects</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#getAll">
      <tt>getAll</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=268&amp;l=280#268">...</a>
    <small>
      - <span class="rst">Return all the objects in the cache.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#finishPut">
      <tt>finishPut</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=154&amp;l=160#154">...</a>
    <small>
      - <span class="rst">Releases the lock that is retained when .get() is called and
returns None.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#created">
      <tt>created</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=161&amp;l=181#161">...</a>
    <small>
      - <span class="rst">Inserts and object into the cache.  Should be used when no one
else knows about the object yet, so there cannot be any object
already in the cache.  After a database INSERT is an example
of this situation.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#clear">
      <tt>clear</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=215&amp;l=223#215">...</a>
    <small>
      - <span class="rst">Removes everything from the cache.  Warning!  This can cause
duplicate objects in memory.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#expireAll">
      <tt>expireAll</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=240&amp;l=254#240">...</a>
    <small>
      - <span class="rst">Expires all objects, moving them all into the expired/weakref
cache.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#tryGet">
      <tt>tryGet</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=54&amp;l=65#54">...</a>
    <small>
      - <span class="rst">This returns None, or the object in cache.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#get">
      <tt>get</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=66&amp;l=143#66">...</a>
    <small>
      - <span class="rst">This method can cause deadlocks!  tryGet is safer</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#expire">
      <tt>expire</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=224&amp;l=239#224">...</a>
    <small>
      - <span class="rst">Expires a single object.  Typically called after a delete.
Doesn't even keep a weakref.  (@@: bad name?)</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#put">
      <tt>put</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=144&amp;l=153#144">...</a>
    <small>
      - <span class="rst">Puts an object into the cache.  Should only be called after
.get(), so that duplicate objects don't end up in the cache.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#allIDs">
      <tt>allIDs</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=255&amp;l=267#255">...</a>
    <small>
      - <span class="rst">Returns the IDs of all objects in the cache.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheFactory.html#__init__">
      <tt>__init__</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=22&amp;l=53#22">...</a>
    <small>
      - <span class="rst">Every cullFrequency times that an item is retrieved from
this cache, the cull method is called.</span>
  </small>
  </li>
    </ul>
  </li><li class="class">
    <span class="prefix">C</span>
    <a href="class-sqlobject.cache.CacheSet.html">
      <tt>CacheSet</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=282&amp;l=377#282">...</a>
    <small>
      - <span class="rst">A CacheSet is used to collect and maintain a series of caches.  In
SQLObject, there is one CacheSet per connection, and one Cache
in the CacheSet for each class, since IDs are not unique across
classes.  It contains methods similar to Cache, but that take
a <tt class="docutils literal">cls</tt> argument.</span>
  </small>
    <ul>
      <li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheSet.html#finishPut">
      <tt>finishPut</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=307&amp;l=309#307">...</a>
    <small></small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheSet.html#weakrefAll">
      <tt>weakrefAll</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=351&amp;l=362#351">...</a>
    <small>
      - <span class="rst">Move all objects in the cls (or if not given, then in all
classes) to the weakref dictionary, where they can be
collected.</span>
  </small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheSet.html#clear">
      <tt>clear</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=323&amp;l=329#323">...</a>
    <small></small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheSet.html#get">
      <tt>get</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=297&amp;l=303#297">...</a>
    <small></small>
  </li><li class="routine">
    <span class="prefix">f</span>
    <a href="class-sqlobject.cache.CacheSet.html#allSubCachesByClassNames">
      <tt>allSubCachesByClassNames</tt>
    </a>
    <a href="sqlobject/cache.py.html?f=348&amp;l=350#348">...</a>
    <small></small>
  </li>
    </ul>
  </li>
    </ul>
  </li>
  </ul>
</div>
      <div id="footer">
        <p style="float: left;">
          built with 
          <a href="http://lesscode.org/projects/pudge/">pudge/0.1.3</a> |
		      original design by 
          <a href="http://blog.ratterobert.com/">ratter / robert</a>
	      </p>
        <div>
        <br> <!--
        <a name="search">
          <form method="get" id="searchform" 
                action="http://lesscode.org/blog/index.php">
            <div>
              <input type="text" value="" name="s" id="s" />
              <input type="submit" id="searchsubmit" value="Search" />
            </div>
          </form>
        </a> -->
        <br>
        </div>
      </div>
    </div>
  </body>
</html>