/
interface_n_i_image_memory_cache.html
594 lines (527 loc) · 28.7 KB
/
interface_n_i_image_memory_cache.html
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nimbus: NIImageMemoryCache Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24278774-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="page">
<div style="position:relative">
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<a style="float: right;margin-right:20px;margin-top:20px" href='http://www.pledgie.com/campaigns/15519'><img alt='Click here to support Nimbus development and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/15519.png?skin_name=chrome' border='0' /></a>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Nimbus
 <span id="projectnumber">0.6.0 - <a href="http://github.com/jverkoey/nimbus">Nimbus is proudly hosted on Github</a></span>
</div>
<div id="projectbrief">An iOS framework whose growth is bounded by O(documentation).</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.4-20110629 -->
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('interface_n_i_image_memory_cache.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">NIImageMemoryCache Class Reference<div class="ingroups"><a class="el" href="group___in-_memory-_caches.html">In-Memory Caches</a></div></div> </div>
</div>
<div class="contents">
<!-- doxytag: class="NIImageMemoryCache" --><!-- doxytag: inherits="NIMemoryCache" --><hr/><a name="details" id="details"></a><h2>Overview</h2>
<div class="textblock"><p>An in-memory cache for storing images with caps on the total number of pixels. </p>
<p>When reduceMemoryUsage is called, the least recently used images are removed from the cache until the numberOfPixels is below maxNumberOfPixelsUnderStress.</p>
<p>When an image is added to the cache that causes the memory usage to pass the max, the least recently used images are removed from the cache until the numberOfPixels is below maxNumberOfPixels.</p>
<p>By default the image memory cache has no limit to its pixel count. You must explicitly set this value in your application.</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>If the cache is too small to fit the newly added image, then all images will end up being removed including the one being added.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="interface_nimbus.html#a3c0417e0cf4a64e6d8004346fc744ce3" title="Access the global image memory cache.">+ imageMemoryCache (Nimbus)</a> </dd>
<dd>
<a class="el" href="interface_nimbus.html#a342e309249ac5309fb6feb238da6630e" title="Set the global image memory cache.">+ setImageMemoryCache: (Nimbus)</a> </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8h_source.html#l00093">93</a> of file <a class="el" href="_n_i_in_memory_cache_8h_source.html">NIInMemoryCache.h</a>.</p>
</div><div class="dynheader">
Inheritance diagram for NIImageMemoryCache:</div>
<div class="dyncontent">
<div class="center">
<img src="interface_n_i_image_memory_cache.png" usemap="#NIImageMemoryCache_map" alt=""/>
<map id="NIImageMemoryCache_map" name="NIImageMemoryCache_map">
<area href="interface_n_i_memory_cache.html" title="An in-memory cache for storing objects with expiration support." alt="NIMemoryCache" shape="rect" coords="0,0,140,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Querying an In-Memory Image Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSUInteger </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_n_i_image_memory_cache.html#a12b709e0f6f319e76c3dc3d6dbe3ee5a">numberOfPixels</a> <span class="suffix">property</span></td></tr>
<tr><td colspan="2"><div class="groupHeader">Setting the Maximum Number of Pixels</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSUInteger </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_n_i_image_memory_cache.html#a30bd865b4e57ff8a73fd459114c22aed">maxNumberOfPixels</a> <span class="suffix">property</span></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSUInteger </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_n_i_image_memory_cache.html#a100ad5b6dea102a5ae296dab5830ce50">maxNumberOfPixelsUnderStress</a> <span class="suffix">property</span></td></tr>
<tr><td colspan="2"><div class="groupHeader">Creating an In-Memory Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a879b58be06ace929185997a92f7bb35b">initWithCapacity:</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Querying an In-Memory Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(NSUInteger) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a61996ab64791ed19840b5055b68c7c95">count</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Storing Objects in the Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a7bc119332422cd4d36863a5f1d7751bd">storeObject:withName:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#acaa6af8abea20907cf230ce1191e7ad4">storeObject:withName:expiresAfter:</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Removing Objects from the Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a5dab1798d4e3bcd2b686837f63f31d1c">removeObjectWithName:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a26fda388dffc22aa78dd17905a6fce73">removeAllObjects</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Accessing Objects in the Cache</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#afdd7b533b55c5d8753078e207ec0a9d7">objectWithName:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(BOOL) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#aadf04db4cd1ef2087971ac58b416c590">containsObjectWithName:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(NSDate *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a6c016c9a322c58151bbfb30793e9d475">dateOfLastAccessWithName:</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Reducing Memory Usage Explicitly</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a8164a276bcc012398b4025d45fe597d2">reduceMemoryUsage</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Subclassing</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>The following methods are provided to aid in subclassing and are not meant to be used externally. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#ae1aac8c4de4609814f7f24440cca011f">willSetObject:withName:previousObject:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#ad803d84fcd1c29cf2dadb58c3f719923">didSetObject:withName:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_memory_cache.html#a07a3aa62d34f2cae0c4c76668de9608e">willRemoveObject:withName:</a></td></tr>
</table>
<hr/><h2>Method Documentation</h2>
<a class="anchor" id="a12b709e0f6f319e76c3dc3d6dbe3ee5a"></a><!-- doxytag: member="NIImageMemoryCache::numberOfPixels" ref="a12b709e0f6f319e76c3dc3d6dbe3ee5a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- NIImageMemoryCache:<code> [read, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the total number of pixels being stored in the cache. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total number of pixels being stored in the cache. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8h_source.html#l00101">101</a> of file <a class="el" href="_n_i_in_memory_cache_8h_source.html">NIInMemoryCache.h</a>.</p>
</div>
</div>
<a class="anchor" id="a30bd865b4e57ff8a73fd459114c22aed"></a><!-- doxytag: member="NIImageMemoryCache::maxNumberOfPixels" ref="a30bd865b4e57ff8a73fd459114c22aed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- NIImageMemoryCache:<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The maximum number of pixels this cache may ever store. </p>
<p>Defaults to 0, which is special cased to represent an unlimited number of pixels.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The maximum number of pixels this cache may ever store. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8h_source.html#l00102">102</a> of file <a class="el" href="_n_i_in_memory_cache_8h_source.html">NIInMemoryCache.h</a>.</p>
</div>
</div>
<a class="anchor" id="a100ad5b6dea102a5ae296dab5830ce50"></a><!-- doxytag: member="NIImageMemoryCache::maxNumberOfPixelsUnderStress" ref="a100ad5b6dea102a5ae296dab5830ce50" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- NIImageMemoryCache:<code> [read, write, assign]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The maximum number of pixels this cache may store after a call to reduceMemoryUsage. </p>
<p>Defaults to 0, which is special cased to represent an unlimited number of pixels.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The maximum number of pixels this cache may store after a call to reduceMemoryUsage. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8h_source.html#l00103">103</a> of file <a class="el" href="_n_i_in_memory_cache_8h_source.html">NIInMemoryCache.h</a>.</p>
</div>
</div>
<a class="anchor" id="a879b58be06ace929185997a92f7bb35b"></a><!-- doxytag: member="NIImageMemoryCache::initWithCapacity:" ref="a879b58be06ace929185997a92f7bb35b" args="(NSUInteger capacity)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) initWithCapacity: </td>
<td></td>
<td class="paramtype">(NSUInteger) </td>
<td class="paramname"><em>capacity</em></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initializes a newly allocated cache with the given capacity. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An in-memory cache initialized with the given capacity. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00116">116</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a61996ab64791ed19840b5055b68c7c95"></a><!-- doxytag: member="NIImageMemoryCache::count" ref="a61996ab64791ed19840b5055b68c7c95" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSUInteger) count </td>
<td></td>
<td class="paramname"></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of objects currently in the cache. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of objects currently in the cache. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00338">338</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a7bc119332422cd4d36863a5f1d7751bd"></a><!-- doxytag: member="NIImageMemoryCache::storeObject:withName:" ref="a7bc119332422cd4d36863a5f1d7751bd" args="(id object,[withName] NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) storeObject: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>object</em></td>
</tr>
<tr>
<td class="paramkey">withName:</td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stores an object in the cache. </p>
<p>The object will be stored without an expiration date. The object will stay in the cache until it's bumped out due to the cache's memory limit.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object being stored in the cache. </td></tr>
<tr><td class="paramname">name</td><td>The name used as a key to store this object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00221">221</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="acaa6af8abea20907cf230ce1191e7ad4"></a><!-- doxytag: member="NIImageMemoryCache::storeObject:withName:expiresAfter:" ref="acaa6af8abea20907cf230ce1191e7ad4" args="(id object,[withName] NSString *name,[expiresAfter] NSDate *expirationDate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) storeObject: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>object</em></td>
</tr>
<tr>
<td class="paramkey">withName:</td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
</tr>
<tr>
<td class="paramkey">expiresAfter:</td>
<td></td>
<td class="paramtype">(NSDate *) </td>
<td class="paramname"><em>expirationDate</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stores an object in the cache with an expiration date. </p>
<p>If an object is stored with an expiration date that has already passed then the object will not be stored in the cache and any existing object will be removed. The rationale behind this is that the object would be removed from the cache the next time it was accessed anyway.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object being stored in the cache. </td></tr>
<tr><td class="paramname">name</td><td>The name used as a key to store this object. </td></tr>
<tr><td class="paramname">expirationDate</td><td>A date after which this object is no longer valid in the cache. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00227">227</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a5dab1798d4e3bcd2b686837f63f31d1c"></a><!-- doxytag: member="NIImageMemoryCache::removeObjectWithName:" ref="a5dab1798d4e3bcd2b686837f63f31d1c" args="(NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) removeObjectWithName: </td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes an object from the cache. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The name used as a key to store this object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00308">308</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a26fda388dffc22aa78dd17905a6fce73"></a><!-- doxytag: member="NIImageMemoryCache::removeAllObjects" ref="a26fda388dffc22aa78dd17905a6fce73" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) removeAllObjects </td>
<td></td>
<td class="paramname"></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes all objects from the cache, regardless of expiration dates. </p>
<p>This will completely clear out the cache and all objects in the cache will be released. </p>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00314">314</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="afdd7b533b55c5d8753078e207ec0a9d7"></a><!-- doxytag: member="NIImageMemoryCache::objectWithName:" ref="afdd7b533b55c5d8753078e207ec0a9d7" args="(NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) objectWithName: </td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieves an object from the cache. </p>
<p>If the object has expired then the object will be removed from the cache and nil will be returned.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The object stored in the cache. The object is retained and autoreleased to ensure that it survives this run loop if you then remove it from the cache. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00260">260</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="aadf04db4cd1ef2087971ac58b416c590"></a><!-- doxytag: member="NIImageMemoryCache::containsObjectWithName:" ref="aadf04db4cd1ef2087971ac58b416c590" args="(NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (BOOL) containsObjectWithName: </td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a Boolean value that indicates whether an object with the given name is present in the cache. </p>
<p>Does not update the access time of the object.</p>
<p>If the object has expired then the object will be removed from the cache and NO will be returned.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>YES if an object with the given name is present in the cache and has not expired, otherwise NO. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00282">282</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a6c016c9a322c58151bbfb30793e9d475"></a><!-- doxytag: member="NIImageMemoryCache::dateOfLastAccessWithName:" ref="a6c016c9a322c58151bbfb30793e9d475" args="(NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSDate *) dateOfLastAccessWithName: </td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the date that the object with the given name was last accessed. </p>
<p>Does not update the access time of the object.</p>
<p>If the object has expired then the object will be removed from the cache and nil will be returned.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The last access date of the object if it exists and has not expired, nil otherwise. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00295">295</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a8164a276bcc012398b4025d45fe597d2"></a><!-- doxytag: member="NIImageMemoryCache::reduceMemoryUsage" ref="a8164a276bcc012398b4025d45fe597d2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) reduceMemoryUsage </td>
<td></td>
<td class="paramname"></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes all expired objects from the cache. </p>
<p>Subclasses may add additional functionality to this implementation. Subclasses should call super in order to prune expired objects.</p>
<p>This will be called when <code>UIApplicationDidReceiveMemoryWarningNotification</code> is posted. </p>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00321">321</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="ae1aac8c4de4609814f7f24440cca011f"></a><!-- doxytag: member="NIImageMemoryCache::willSetObject:withName:previousObject:" ref="ae1aac8c4de4609814f7f24440cca011f" args="(id object,[withName] NSString *name,[previousObject] id previousObject)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) willSetObject: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>object</em></td>
</tr>
<tr>
<td class="paramkey">withName:</td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em></td>
</tr>
<tr>
<td class="paramkey">previousObject:</td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>previousObject</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An object is about to be stored in the cache. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object that is about to be stored in the cache. </td></tr>
<tr><td class="paramname">name</td><td>The cache name for the object. </td></tr>
<tr><td class="paramname">previousObject</td><td>The object previously stored in the cache. This may be the same as object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00197">197</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="ad803d84fcd1c29cf2dadb58c3f719923"></a><!-- doxytag: member="NIImageMemoryCache::didSetObject:withName:" ref="ad803d84fcd1c29cf2dadb58c3f719923" args="(id object,[withName] NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) didSetObject: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>object</em></td>
</tr>
<tr>
<td class="paramkey">withName:</td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An object has been stored in the cache. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object that was stored in the cache. </td></tr>
<tr><td class="paramname">name</td><td>The cache name for the object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00203">203</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
<a class="anchor" id="a07a3aa62d34f2cae0c4c76668de9608e"></a><!-- doxytag: member="NIImageMemoryCache::willRemoveObject:withName:" ref="a07a3aa62d34f2cae0c4c76668de9608e" args="(id object,[withName] NSString *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) willRemoveObject: </td>
<td></td>
<td class="paramtype">(id) </td>
<td class="paramname"><em>object</em></td>
</tr>
<tr>
<td class="paramkey">withName:</td>
<td></td>
<td class="paramtype">(<a class="el" href="class_n_s_string.html">NSString</a> *) </td>
<td class="paramname"><em>name</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An object is about to be removed from the cache. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object about to removed from the cache. </td></tr>
<tr><td class="paramname">name</td><td>The cache name for the object about to be removed. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_in_memory_cache_8m_source.html#l00209">209</a> of file <a class="el" href="_n_i_in_memory_cache_8m_source.html">NIInMemoryCache.m</a>.</p>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="interface_n_i_image_memory_cache.html">NIImageMemoryCache</a> </li>
</div><!-- .fixedwidth -->
<span class="footer">Generated for Nimbus by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4-20110629 </span>
</ul>
</div>
</div> <!-- page -->
</body>
</html>