File: class-sqlobject.cache.CacheSet.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 (209 lines) | stat: -rw-r--r-- 9,015 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

  <h1 class="pudge-member-page-heading">
    <tt>CacheSet</tt>
  </h1>
  <h4 class="pudge-member-page-subheading">
    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.
  </h4>
  <p class="pudge-member-parent-link">
    <small>
    The CacheSet class is accessible via the
    <a href="module-sqlobject.cache.html">
      <tt>sqlobject.cache</tt>
    </a> module.
    </small>
  </p>
  <div id="pudge-section-nav">
  <ul>
    <li>
      <span class="pudge-missing-section-link">
        Attributes
      </span>
    </li><li>
      <a href="#methods" class="pudge-section-link">
        Methods (17)
      </a>
    </li>
    <li>
      <a href="sqlobject/cache.py.html?f=282&amp;l=377#282" class="pudge-section-link">
        Source
      </a>
    </li>
  </ul>
  </div>
  <div style="clear: left"></div>
  <hr>
    <a name="methods"></a>
    <h2>Methods</h2>
    <div class="pudge-member routine alias">
    <a name="__format__"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#__format__" class="pudge-obj-link">__format__</a>(...)</tt>
      <a href="__builtin__.py.html" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    <p class="pudge-member-blurb">
      default object formatter
    </p>
    </div>
  </div><div class="pudge-member routine alias">
    <a name="__subclasshook__"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#__subclasshook__" class="pudge-obj-link">__subclasshook__</a>(...)</tt>
      <a href="None.html" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    <p class="pudge-member-blurb">
      Abstract classes can override this to customize issubclass().
    </p>
    <p>This is invoked early on by abc.ABCMeta.__subclasscheck__().
It should return True, False or NotImplemented.  If it returns
NotImplemented, the normal algorithm is used.  Otherwise, it
overrides the normal algorithm (and the outcome is cached).</p>
    </div>
  </div><div class="pudge-member routine alias">
    <a name="__sizeof__"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#__sizeof__" class="pudge-obj-link">__sizeof__</a>(...)</tt>
      <a href="__builtin__.py.html" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    <p class="pudge-member-blurb">
      __sizeof__() -> int
size of object in memory, in bytes
    </p>
    </div>
  </div><div class="pudge-member routine ">
    <a name="__init__"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#__init__" class="pudge-obj-link">__init__</a>(self, *args, **kw)</tt>
      <a href="sqlobject/cache.py.html?f=292&amp;l=296#292" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="get"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#get" class="pudge-obj-link">get</a>(self, id, cls)</tt>
      <a href="sqlobject/cache.py.html?f=297&amp;l=303#297" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="put"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#put" class="pudge-obj-link">put</a>(self, id, cls, obj)</tt>
      <a href="sqlobject/cache.py.html?f=304&amp;l=306#304" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="finishPut"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#finishPut" class="pudge-obj-link">finishPut</a>(self, cls)</tt>
      <a href="sqlobject/cache.py.html?f=307&amp;l=309#307" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="created"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#created" class="pudge-obj-link">created</a>(self, id, cls, obj)</tt>
      <a href="sqlobject/cache.py.html?f=310&amp;l=316#310" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="expire"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#expire" class="pudge-obj-link">expire</a>(self, id, cls)</tt>
      <a href="sqlobject/cache.py.html?f=317&amp;l=322#317" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="clear"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#clear" class="pudge-obj-link">clear</a>(self, cls=None)</tt>
      <a href="sqlobject/cache.py.html?f=323&amp;l=329#323" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="tryGet"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#tryGet" class="pudge-obj-link">tryGet</a>(self, id, cls)</tt>
      <a href="sqlobject/cache.py.html?f=330&amp;l=332#330" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="tryGetByName"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#tryGetByName" class="pudge-obj-link">tryGetByName</a>(self, id, clsname)</tt>
      <a href="sqlobject/cache.py.html?f=333&amp;l=338#333" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="allIDs"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#allIDs" class="pudge-obj-link">allIDs</a>(self, cls)</tt>
      <a href="sqlobject/cache.py.html?f=339&amp;l=344#339" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="allSubCaches"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#allSubCaches" class="pudge-obj-link">allSubCaches</a>(self)</tt>
      <a href="sqlobject/cache.py.html?f=345&amp;l=347#345" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="allSubCachesByClassNames"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#allSubCachesByClassNames" class="pudge-obj-link">allSubCachesByClassNames</a>(self)</tt>
      <a href="sqlobject/cache.py.html?f=348&amp;l=350#348" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    </div>
  </div><div class="pudge-member routine ">
    <a name="weakrefAll"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#weakrefAll" class="pudge-obj-link">weakrefAll</a>(self, cls=None)</tt>
      <a href="sqlobject/cache.py.html?f=351&amp;l=362#351" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    <p class="pudge-member-blurb">
      Move all objects in the cls (or if not given, then in all
classes) to the weakref dictionary, where they can be
collected.
    </p>
    </div>
  </div><div class="pudge-member routine ">
    <a name="getAll"></a>
    <h4 class="pudge-member-name"><span class="prefix">f</span>
      <tt><a href="class-sqlobject.cache.CacheSet.html#getAll" class="pudge-obj-link">getAll</a>(self, cls=None)</tt>
      <a href="sqlobject/cache.py.html?f=363&amp;l=377#363" title="View Source">...</a>
    </h4>
    <div class="pudge-section rst">
    <p class="pudge-member-blurb">
      Returns all instances in the cache for the given class or all
classes.
    </p>
    </div>
  </div>
  <p>
    <small>
    See 
    <a href="sqlobject/cache.py.html?f=282&amp;l=377#282" title="sqlobject/cache.py:282">the source</a>
    for more information.
    </small>
  </p>