localmemcache 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/README +5 -2
  2. data/Rakefile +4 -0
  3. data/VERSION +1 -1
  4. data/bench/lmc_bench.rb +1 -1
  5. data/bench/tokyo_cabinet_bench +3 -0
  6. data/bench/tokyo_cabinet_bench.rb +20 -0
  7. data/site/doc/classes/LocalMemCache.html +146 -129
  8. data/site/doc/classes/LocalMemCache.src/M000001.html +1 -1
  9. data/site/doc/classes/LocalMemCache.src/M000002.html +26 -5
  10. data/site/doc/classes/LocalMemCache.src/M000003.html +16 -5
  11. data/site/doc/classes/LocalMemCache.src/M000004.html +7 -23
  12. data/site/doc/classes/LocalMemCache.src/M000005.html +7 -13
  13. data/site/doc/classes/LocalMemCache.src/M000006.html +4 -5
  14. data/site/doc/classes/LocalMemCache.src/M000007.html +6 -5
  15. data/site/doc/classes/LocalMemCache.src/M000008.html +6 -6
  16. data/site/doc/classes/LocalMemCache.src/M000009.html +1 -1
  17. data/site/doc/classes/LocalMemCache.src/M000010.html +4 -6
  18. data/site/doc/classes/LocalMemCache.src/M000011.html +4 -4
  19. data/site/doc/classes/LocalMemCache.src/M000012.html +4 -4
  20. data/site/doc/classes/LocalMemCache/ArgError.html +2 -2
  21. data/site/doc/classes/LocalMemCache/InitError.html +2 -2
  22. data/site/doc/classes/LocalMemCache/LocalMemCacheError.html +2 -2
  23. data/site/doc/classes/LocalMemCache/LockError.html +2 -2
  24. data/site/doc/classes/LocalMemCache/LockTimedOut.html +2 -2
  25. data/site/doc/classes/LocalMemCache/MemoryPoolClosed.html +2 -2
  26. data/site/doc/classes/LocalMemCache/MemoryPoolFull.html +2 -2
  27. data/site/doc/classes/LocalMemCache/OutOfMemoryError.html +2 -2
  28. data/site/doc/classes/LocalMemCache/RecoveryFailed.html +2 -2
  29. data/site/doc/classes/LocalMemCache/ShmError.html +2 -2
  30. data/site/doc/classes/LocalMemCache/ShmLockFailed.html +2 -2
  31. data/site/doc/classes/LocalMemCache/ShmUnlockFailed.html +2 -2
  32. data/site/doc/created.rid +1 -1
  33. data/site/doc/fr_class_index.html +2 -0
  34. data/site/doc/fr_file_index.html +3 -2
  35. data/site/doc/fr_method_index.html +17 -11
  36. data/site/doc/index.html +1 -1
  37. data/site/index.html +33 -17
  38. data/src/lmc_common.c +2 -1
  39. data/src/lmc_common.h +1 -1
  40. data/src/lmc_hashtable.c +62 -2
  41. data/src/lmc_hashtable.h +4 -1
  42. data/src/lmc_shm.c +1 -3
  43. data/src/lmc_shm.h +1 -3
  44. data/src/lmc_valloc.c +5 -0
  45. data/src/lmc_valloc.h +1 -0
  46. data/src/localmemcache.c +43 -8
  47. data/src/localmemcache.h +24 -6
  48. data/src/ruby-binding/localmemcache.rb +14 -29
  49. data/src/ruby-binding/rblocalmemcache.c +127 -16
  50. data/src/tests/allocfailure.rb +1 -1
  51. data/src/tests/bench.rb +1 -1
  52. data/src/tests/bench_keys.rb +1 -1
  53. data/src/tests/crash.rb +1 -1
  54. data/src/tests/lmc.rb +65 -9
  55. data/src/tests/lmctestapi.c +1 -1
  56. data/src/tests/parallelwrite.rb +1 -1
  57. data/src/tests/ttkeys +10 -0
  58. data/src/tests/ttkeys.rb +35 -0
  59. data/src/tests/ttlmc.rb +24 -6
  60. data/src/tests/ttrandom_pair +10 -0
  61. data/src/tests/ttrandom_pair.rb +23 -0
  62. metadata +8 -5
  63. data/site/doc/files/__/src/ruby-binding/extconf_rb.html +0 -108
  64. data/site/doc/files/__/src/ruby-binding/localmemcache_rb.html +0 -108
  65. data/site/doc/files/__/src/ruby-binding/rblocalmemcache_c.html +0 -101
data/README CHANGED
@@ -17,7 +17,8 @@ alternative to GDBM and Berkeley DB.
17
17
  SUPPORTED SYSTEMS
18
18
  =================
19
19
 
20
- - a >=64bit Unix
20
+ - a >=64bit Unix (32bit is possible but you'll run out of virtual address
21
+ space quickly)
21
22
  - a file system that offers sparse files
22
23
 
23
24
  Note for OS X: OS X disqualifies as HFS+ doesn't have sparse files and
@@ -35,7 +36,9 @@ require 'localmemcache'
35
36
  # 1. the memcached way
36
37
  # $lm = LocalMemCache.new :namespace => :viewcounters
37
38
  # 2. the GDBM way
38
- $lm = LocalMemCache.new :filename => "./viewcounters.lmc"
39
+ #$lm = LocalMemCache.new :filename => "./viewcounters.lmc"
40
+ # 3. Using LocalMemCache::SharedObjectStorage
41
+ $lm = LocalMemCache::SharedObjectStorage.new :filename => "./viewcounters.lmc"
39
42
  $lm[:foo] = 1
40
43
  $lm[:foo]
41
44
  $lm.delete(:foo)
data/Rakefile CHANGED
@@ -32,6 +32,10 @@ task :sanity_test do
32
32
  "make -C src/tests/ && ./src/tests/lmc "
33
33
  end
34
34
 
35
+ task :site_rdoc do
36
+ sh "cd ./src/ruby-binding; rdoc -o ../../site/doc"
37
+ end
38
+
35
39
  task :performance_test do
36
40
  sh "./configure && make -C src clean && make -C src && " +
37
41
  "(cd src/ruby-binding; ruby extconf.rb) && " +
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -4,7 +4,7 @@ $DIR=File.dirname(__FILE__)
4
4
  require 'localmemcache'
5
5
  require 'common.rb'
6
6
 
7
- LocalMemCache.clear_namespace("speed-comparison");
7
+ LocalMemCache.drop :namespace=>"speed-comparison", :force => true
8
8
  $lm2 = LocalMemCache.new :namespace=>"speed-comparison"
9
9
 
10
10
  def compare_speed(n)
@@ -0,0 +1,3 @@
1
+ #! /bin/sh
2
+
3
+ ruby ./tokyo_cabinet_bench.rb
@@ -0,0 +1,20 @@
1
+ $DIR=File.dirname(__FILE__)
2
+ ['.'].each {|p| $:.unshift File.join($DIR, p) }
3
+
4
+ require 'tokyocabinet'
5
+ require './common.rb'
6
+
7
+ def __test(n)
8
+ $cache = TokyoCabinet::BDB.new
9
+ $cache.open("/tmp/casket.bdb", TokyoCabinet::BDB::OWRITER |
10
+ TokyoCabinet::BDB::OCREAT)
11
+
12
+ $cache.clear
13
+ measure_time(n) {
14
+ r = rand(10000).to_s
15
+ $cache[r] = r
16
+ $cache[r]
17
+ }
18
+ end
19
+
20
+ __test(2_000_000)
@@ -55,12 +55,12 @@
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/__/src/ruby-binding/localmemcache_rb.html">
59
- ../src/ruby-binding/localmemcache.rb
58
+ <a href="../files/localmemcache_rb.html">
59
+ localmemcache.rb
60
60
  </a>
61
61
  <br />
62
- <a href="../files/__/src/ruby-binding/rblocalmemcache_c.html">
63
- ../src/ruby-binding/rblocalmemcache.c
62
+ <a href="../files/rblocalmemcache_c.html">
63
+ rblocalmemcache.c
64
64
  </a>
65
65
  <br />
66
66
  </td>
@@ -124,13 +124,18 @@ a persistent key value database, just use the :filename instead of the
124
124
 
125
125
  == Clearing memory pools
126
126
 
127
- Removing memory pools can be done with LocalMemCache.clear(options).
127
+ Removing memory pools can be done with LocalMemCache.drop(options).
128
128
 
129
129
  == Environment
130
130
 
131
131
  If you use the :namespace parameter, the .lmc file for your namespace will
132
132
  reside in /var/tmp/localmemcache. This can be overriden by setting the
133
133
  LMC_NAMESPACES_ROOT_PATH variable in the environment.
134
+
135
+ == Storing Ruby Objects
136
+
137
+ If you want to store Ruby objects instead of just strings, consider
138
+ using LocalMemCache::SharedObjectStorage.
134
139
  </pre>
135
140
 
136
141
  </div>
@@ -142,18 +147,20 @@ a persistent key value database, just use the :filename instead of the
142
147
  <h3 class="section-bar">Methods</h3>
143
148
 
144
149
  <div class="name-list">
145
- <a href="#M000007">[]</a>&nbsp;&nbsp;
146
- <a href="#M000010">[]=</a>&nbsp;&nbsp;
147
- <a href="#M000005">check</a>&nbsp;&nbsp;
148
- <a href="#M000003">check_namespace</a>&nbsp;&nbsp;
149
- <a href="#M000004">clear</a>&nbsp;&nbsp;
150
- <a href="#M000002">clear_namespace</a>&nbsp;&nbsp;
151
- <a href="#M000012">close</a>&nbsp;&nbsp;
152
- <a href="#M000008">delete</a>&nbsp;&nbsp;
153
- <a href="#M000006">get</a>&nbsp;&nbsp;
154
- <a href="#M000011">keys</a>&nbsp;&nbsp;
150
+ <a href="#M000005">[]</a>&nbsp;&nbsp;
151
+ <a href="#M000009">[]=</a>&nbsp;&nbsp;
152
+ <a href="#M000003">check</a>&nbsp;&nbsp;
153
+ <a href="#M000008">clear</a>&nbsp;&nbsp;
154
+ <a href="#M000013">close</a>&nbsp;&nbsp;
155
+ <a href="#M000006">delete</a>&nbsp;&nbsp;
156
+ <a href="#M000002">drop</a>&nbsp;&nbsp;
157
+ <a href="#M000011">each_pair</a>&nbsp;&nbsp;
158
+ <a href="#M000004">get</a>&nbsp;&nbsp;
159
+ <a href="#M000010">keys</a>&nbsp;&nbsp;
155
160
  <a href="#M000001">new</a>&nbsp;&nbsp;
156
- <a href="#M000009">set</a>&nbsp;&nbsp;
161
+ <a href="#M000012">random_pair</a>&nbsp;&nbsp;
162
+ <a href="#M000007">set</a>&nbsp;&nbsp;
163
+ <a href="#M000014">size</a>&nbsp;&nbsp;
157
164
  </div>
158
165
  </div>
159
166
 
@@ -168,6 +175,7 @@ a persistent key value database, just use the :filename instead of the
168
175
  <h3 class="section-bar">Classes and Modules</h3>
169
176
 
170
177
  Class <a href="LocalMemCache/ArgError.html" class="link">LocalMemCache::ArgError</a><br />
178
+ Class <a href="LocalMemCache/DBVersionNotSupported.html" class="link">LocalMemCache::DBVersionNotSupported</a><br />
171
179
  Class <a href="LocalMemCache/InitError.html" class="link">LocalMemCache::InitError</a><br />
172
180
  Class <a href="LocalMemCache/LocalMemCacheError.html" class="link">LocalMemCache::LocalMemCacheError</a><br />
173
181
  Class <a href="LocalMemCache/LockError.html" class="link">LocalMemCache::LockError</a><br />
@@ -176,6 +184,7 @@ Class <a href="LocalMemCache/MemoryPoolClosed.html" class="link">LocalMemCache::
176
184
  Class <a href="LocalMemCache/MemoryPoolFull.html" class="link">LocalMemCache::MemoryPoolFull</a><br />
177
185
  Class <a href="LocalMemCache/OutOfMemoryError.html" class="link">LocalMemCache::OutOfMemoryError</a><br />
178
186
  Class <a href="LocalMemCache/RecoveryFailed.html" class="link">LocalMemCache::RecoveryFailed</a><br />
187
+ Class <a href="LocalMemCache/SharedObjectStorage.html" class="link">LocalMemCache::SharedObjectStorage</a><br />
179
188
  Class <a href="LocalMemCache/ShmError.html" class="link">LocalMemCache::ShmError</a><br />
180
189
  Class <a href="LocalMemCache/ShmLockFailed.html" class="link">LocalMemCache::ShmLockFailed</a><br />
181
190
  Class <a href="LocalMemCache/ShmUnlockFailed.html" class="link">LocalMemCache::ShmUnlockFailed</a><br />
@@ -192,48 +201,19 @@ Class <a href="LocalMemCache/ShmUnlockFailed.html" class="link">LocalMemCache::S
192
201
  <div id="methods">
193
202
  <h3 class="section-bar">Public Class methods</h3>
194
203
 
195
- <div id="method-M000005" class="method-detail">
196
- <a name="M000005"></a>
197
-
198
- <div class="method-heading">
199
- <a href="LocalMemCache.src/M000005.html" target="Code" class="method-signature"
200
- onclick="popupCode('LocalMemCache.src/M000005.html');return false;">
201
- <span class="method-name"> LocalMemCache.check(*args)<br />
202
- </span>
203
- </a>
204
- </div>
205
-
206
- <div class="method-description">
207
- <p>
208
- Tries to repair a corrupt namespace. Usually one doesn&#8216;t call this
209
- method directly, it&#8216;s invoked automatically when operations time out.
210
- </p>
211
- <p>
212
- valid options are [:namespace] [:filename]
213
- </p>
214
- <p>
215
- The memory pool must be specified by either setting the :filename or
216
- :namespace option.
217
- </p>
218
- </div>
219
- </div>
220
-
221
204
  <div id="method-M000003" class="method-detail">
222
205
  <a name="M000003"></a>
223
206
 
224
207
  <div class="method-heading">
225
208
  <a href="LocalMemCache.src/M000003.html" target="Code" class="method-signature"
226
209
  onclick="popupCode('LocalMemCache.src/M000003.html');return false;">
227
- <span class="method-name">check_namespace</span><span class="method-args">(namespace)</span>
210
+ <span class="method-name"> LocalMemCache.check(*args)<br />
211
+ </span>
228
212
  </a>
229
213
  </div>
230
214
 
231
215
  <div class="method-description">
232
216
  <p>
233
- NOTE: This method is deprecated, use <a
234
- href="LocalMemCache.html#M000005">LocalMemCache.check(*args)</a> instead.
235
- </p>
236
- <p>
237
217
  Tries to repair a corrupt namespace. Usually one doesn&#8216;t call this
238
218
  method directly, it&#8216;s invoked automatically when operations time out.
239
219
  </p>
@@ -242,84 +222,48 @@ valid options are [:namespace] [:filename]
242
222
  </p>
243
223
  <p>
244
224
  The memory pool must be specified by either setting the :filename or
245
- :namespace option. The default for :repair is false.
225
+ :namespace option.
246
226
  </p>
247
227
  </div>
248
228
  </div>
249
229
 
250
- <div id="method-M000004" class="method-detail">
251
- <a name="M000004"></a>
230
+ <div id="method-M000002" class="method-detail">
231
+ <a name="M000002"></a>
252
232
 
253
233
  <div class="method-heading">
254
- <a href="LocalMemCache.src/M000004.html" target="Code" class="method-signature"
255
- onclick="popupCode('LocalMemCache.src/M000004.html');return false;">
256
- <span class="method-name"> LocalMemCache.clear(*args)<br />
234
+ <a href="LocalMemCache.src/M000002.html" target="Code" class="method-signature"
235
+ onclick="popupCode('LocalMemCache.src/M000002.html');return false;">
236
+ <span class="method-name"> LocalMemCache.drop(*args)<br />
257
237
  </span>
258
238
  </a>
259
239
  </div>
260
240
 
261
241
  <div class="method-description">
262
242
  <p>
263
- Deletes a memory pool. If the :repair option is <a
264
- href="LocalMemCache.html#M000009">set</a>, locked semaphores are removed as
243
+ Deletes a memory pool. If the :force option is <a
244
+ href="LocalMemCache.html#M000007">set</a>, locked semaphores are removed as
265
245
  well.
266
246
  </p>
267
247
  <p>
268
- WARNING: Do only call this method with the :repair option if you are sure
248
+ WARNING: Do only call this method with the :force option if you are sure
269
249
  that you really want to remove this memory pool and no more processes are
270
250
  still using it.
271
251
  </p>
272
252
  <p>
273
- If you <a href="LocalMemCache.html#M000008">delete</a> a pool and other
253
+ If you <a href="LocalMemCache.html#M000006">delete</a> a pool and other
274
254
  processes still have handles open on it, the status of these handles
275
255
  becomes undefined. There&#8216;s no way for a process to know when a handle
276
256
  is not valid anymore, so only <a
277
- href="LocalMemCache.html#M000008">delete</a> a memory pool if you are sure
257
+ href="LocalMemCache.html#M000006">delete</a> a memory pool if you are sure
278
258
  that all handles are closed.
279
259
  </p>
280
260
  <p>
281
- valid options for <a href="LocalMemCache.html#M000004">clear</a> are
282
- [:namespace] [:filename] [:repair]
261
+ valid options for <a href="LocalMemCache.html#M000002">drop</a> are
262
+ [:namespace] [:filename] [:force]
283
263
  </p>
284
264
  <p>
285
265
  The memory pool must be specified by either setting the :filename or
286
- :namespace option. The default for :repair is false.
287
- </p>
288
- </div>
289
- </div>
290
-
291
- <div id="method-M000002" class="method-detail">
292
- <a name="M000002"></a>
293
-
294
- <div class="method-heading">
295
- <a href="LocalMemCache.src/M000002.html" target="Code" class="method-signature"
296
- onclick="popupCode('LocalMemCache.src/M000002.html');return false;">
297
- <span class="method-name">clear_namespace</span><span class="method-args">(namespace, repair = false)</span>
298
- </a>
299
- </div>
300
-
301
- <div class="method-description">
302
- <p>
303
- NOTE: This method is deprecated, use <a
304
- href="LocalMemCache.html#M000004">LocalMemCache.clear(*args)</a> instead.
305
- </p>
306
- <p>
307
- Deletes a memory pool. If the repair flag is <a
308
- href="LocalMemCache.html#M000009">set</a>, locked semaphores are removed as
309
- well.
310
- </p>
311
- <p>
312
- If you <a href="LocalMemCache.html#M000008">delete</a> a pool and other
313
- processes still have handles open on it, the status of these handles
314
- becomes undefined. There&#8216;s no way for a process to know when a handle
315
- is not valid anymore, so only <a
316
- href="LocalMemCache.html#M000008">delete</a> a memory pool if you are sure
317
- that all handles are closed.
318
- </p>
319
- <p>
320
- WARNING: Do only call this method with the repair=true flag if you are sure
321
- that you really want to remove this memory pool and no more processes are
322
- still using it.
266
+ :namespace option. The default for :force is false.
323
267
  </p>
324
268
  </div>
325
269
  </div>
@@ -360,22 +304,23 @@ LMC_NAMESPACES_ROOT_PATH variable in the environment.
360
304
  When you first call .<a href="LocalMemCache.html#M000001">new</a> for a
361
305
  previously not existing memory pool, a sparse file will be created and
362
306
  memory and disk space will be allocated to hold the empty hashtable (about
363
- 100K), so the size_mb refers only to the maximum size of the memory pool.
364
- .<a href="LocalMemCache.html#M000001">new</a> for an already existing
365
- memory pool will only map the already previously allocated RAM into the
366
- virtual address space of your process.
307
+ 100K), so the size_mb refers only to the maximum <a
308
+ href="LocalMemCache.html#M000014">size</a> of the memory pool. .<a
309
+ href="LocalMemCache.html#M000001">new</a> for an already existing memory
310
+ pool will only map the already previously allocated RAM into the virtual
311
+ address space of your process.
367
312
  </p>
368
313
  </div>
369
314
  </div>
370
315
 
371
316
  <h3 class="section-bar">Public Instance methods</h3>
372
317
 
373
- <div id="method-M000007" class="method-detail">
374
- <a name="M000007"></a>
318
+ <div id="method-M000005" class="method-detail">
319
+ <a name="M000005"></a>
375
320
 
376
321
  <div class="method-heading">
377
- <a href="LocalMemCache.src/M000007.html" target="Code" class="method-signature"
378
- onclick="popupCode('LocalMemCache.src/M000007.html');return false;">
322
+ <a href="LocalMemCache.src/M000005.html" target="Code" class="method-signature"
323
+ onclick="popupCode('LocalMemCache.src/M000005.html');return false;">
379
324
  <span class="method-name">lmc.get(key) &rarr; string value or nil<br />
380
325
  lmc[key] &rarr; string value or nil<br />
381
326
  </span>
@@ -389,12 +334,12 @@ Retrieve string value from hashtable.
389
334
  </div>
390
335
  </div>
391
336
 
392
- <div id="method-M000010" class="method-detail">
393
- <a name="M000010"></a>
337
+ <div id="method-M000009" class="method-detail">
338
+ <a name="M000009"></a>
394
339
 
395
340
  <div class="method-heading">
396
- <a href="LocalMemCache.src/M000010.html" target="Code" class="method-signature"
397
- onclick="popupCode('LocalMemCache.src/M000010.html');return false;">
341
+ <a href="LocalMemCache.src/M000009.html" target="Code" class="method-signature"
342
+ onclick="popupCode('LocalMemCache.src/M000009.html');return false;">
398
343
  <span class="method-name">lmc.set(key, value) &rarr; Qnil<br />
399
344
  lmc[key]=value &rarr; Qnil<br />
400
345
  </span>
@@ -408,38 +353,38 @@ Set value for key in hashtable. Value and key will be converted to string.
408
353
  </div>
409
354
  </div>
410
355
 
411
- <div id="method-M000012" class="method-detail">
412
- <a name="M000012"></a>
356
+ <div id="method-M000008" class="method-detail">
357
+ <a name="M000008"></a>
413
358
 
414
359
  <div class="method-heading">
415
- <a href="LocalMemCache.src/M000012.html" target="Code" class="method-signature"
416
- onclick="popupCode('LocalMemCache.src/M000012.html');return false;">
417
- <span class="method-name">lmc.close() &rarr; Qnil<br />
360
+ <a href="LocalMemCache.src/M000008.html" target="Code" class="method-signature"
361
+ onclick="popupCode('LocalMemCache.src/M000008.html');return false;">
362
+ <span class="method-name">lmc.clear &rarr; Qnil<br />
418
363
  </span>
419
364
  </a>
420
365
  </div>
421
366
 
422
367
  <div class="method-description">
423
368
  <p>
424
- Releases hashtable.
369
+ Clears content of hashtable.
425
370
  </p>
426
371
  </div>
427
372
  </div>
428
373
 
429
- <div id="method-M000008" class="method-detail">
430
- <a name="M000008"></a>
374
+ <div id="method-M000013" class="method-detail">
375
+ <a name="M000013"></a>
431
376
 
432
377
  <div class="method-heading">
433
- <a href="LocalMemCache.src/M000008.html" target="Code" class="method-signature"
434
- onclick="popupCode('LocalMemCache.src/M000008.html');return false;">
435
- <span class="method-name">lmc.delete(key) &rarr; Qnil<br />
378
+ <a href="LocalMemCache.src/M000013.html" target="Code" class="method-signature"
379
+ onclick="popupCode('LocalMemCache.src/M000013.html');return false;">
380
+ <span class="method-name">lmc.close() &rarr; Qnil<br />
436
381
  </span>
437
382
  </a>
438
383
  </div>
439
384
 
440
385
  <div class="method-description">
441
386
  <p>
442
- Deletes key from hashtable. The key is converted to string.
387
+ Releases hashtable.
443
388
  </p>
444
389
  </div>
445
390
  </div>
@@ -450,15 +395,14 @@ Deletes key from hashtable. The key is converted to string.
450
395
  <div class="method-heading">
451
396
  <a href="LocalMemCache.src/M000006.html" target="Code" class="method-signature"
452
397
  onclick="popupCode('LocalMemCache.src/M000006.html');return false;">
453
- <span class="method-name">lmc.get(key) &rarr; string value or nil<br />
454
- lmc[key] &rarr; string value or nil<br />
398
+ <span class="method-name">lmc.delete(key) &rarr; Qnil<br />
455
399
  </span>
456
400
  </a>
457
401
  </div>
458
402
 
459
403
  <div class="method-description">
460
404
  <p>
461
- Retrieve string value from hashtable.
405
+ Deletes key from hashtable. The key is converted to string.
462
406
  </p>
463
407
  </div>
464
408
  </div>
@@ -469,6 +413,43 @@ Retrieve string value from hashtable.
469
413
  <div class="method-heading">
470
414
  <a href="LocalMemCache.src/M000011.html" target="Code" class="method-signature"
471
415
  onclick="popupCode('LocalMemCache.src/M000011.html');return false;">
416
+ <span class="method-name">lmc.each_pair {|k, v| block } &rarr; nil<br />
417
+ </span>
418
+ </a>
419
+ </div>
420
+
421
+ <div class="method-description">
422
+ <p>
423
+ Iterates over hashtable.
424
+ </p>
425
+ </div>
426
+ </div>
427
+
428
+ <div id="method-M000004" class="method-detail">
429
+ <a name="M000004"></a>
430
+
431
+ <div class="method-heading">
432
+ <a href="LocalMemCache.src/M000004.html" target="Code" class="method-signature"
433
+ onclick="popupCode('LocalMemCache.src/M000004.html');return false;">
434
+ <span class="method-name">lmc.get(key) &rarr; string value or nil<br />
435
+ lmc[key] &rarr; string value or nil<br />
436
+ </span>
437
+ </a>
438
+ </div>
439
+
440
+ <div class="method-description">
441
+ <p>
442
+ Retrieve string value from hashtable.
443
+ </p>
444
+ </div>
445
+ </div>
446
+
447
+ <div id="method-M000010" class="method-detail">
448
+ <a name="M000010"></a>
449
+
450
+ <div class="method-heading">
451
+ <a href="LocalMemCache.src/M000010.html" target="Code" class="method-signature"
452
+ onclick="popupCode('LocalMemCache.src/M000010.html');return false;">
472
453
  <span class="method-name">lmc.keys() &rarr; array or nil<br />
473
454
  </span>
474
455
  </a>
@@ -476,17 +457,35 @@ Retrieve string value from hashtable.
476
457
 
477
458
  <div class="method-description">
478
459
  <p>
479
- Returns a list of <a href="LocalMemCache.html#M000011">keys</a>.
460
+ Returns a list of <a href="LocalMemCache.html#M000010">keys</a>.
480
461
  </p>
481
462
  </div>
482
463
  </div>
483
464
 
484
- <div id="method-M000009" class="method-detail">
485
- <a name="M000009"></a>
465
+ <div id="method-M000012" class="method-detail">
466
+ <a name="M000012"></a>
486
467
 
487
468
  <div class="method-heading">
488
- <a href="LocalMemCache.src/M000009.html" target="Code" class="method-signature"
489
- onclick="popupCode('LocalMemCache.src/M000009.html');return false;">
469
+ <a href="LocalMemCache.src/M000012.html" target="Code" class="method-signature"
470
+ onclick="popupCode('LocalMemCache.src/M000012.html');return false;">
471
+ <span class="method-name">lmc.random_pair() &rarr; [key, value] or nil<br />
472
+ </span>
473
+ </a>
474
+ </div>
475
+
476
+ <div class="method-description">
477
+ <p>
478
+ Retrieves random pair from hashtable.
479
+ </p>
480
+ </div>
481
+ </div>
482
+
483
+ <div id="method-M000007" class="method-detail">
484
+ <a name="M000007"></a>
485
+
486
+ <div class="method-heading">
487
+ <a href="LocalMemCache.src/M000007.html" target="Code" class="method-signature"
488
+ onclick="popupCode('LocalMemCache.src/M000007.html');return false;">
490
489
  <span class="method-name">lmc.set(key, value) &rarr; Qnil<br />
491
490
  lmc[key]=value &rarr; Qnil<br />
492
491
  </span>
@@ -500,6 +499,24 @@ Set value for key in hashtable. Value and key will be converted to string.
500
499
  </div>
501
500
  </div>
502
501
 
502
+ <div id="method-M000014" class="method-detail">
503
+ <a name="M000014"></a>
504
+
505
+ <div class="method-heading">
506
+ <a href="LocalMemCache.src/M000014.html" target="Code" class="method-signature"
507
+ onclick="popupCode('LocalMemCache.src/M000014.html');return false;">
508
+ <span class="method-name">lmc.size &rarr; number<br />
509
+ </span>
510
+ </a>
511
+ </div>
512
+
513
+ <div class="method-description">
514
+ <p>
515
+ Number of pairs in the hashtable.
516
+ </p>
517
+ </div>
518
+ </div>
519
+
503
520
 
504
521
  </div>
505
522