/[pupa]/ruby-cache/MANUAL.rd
ViewVC logotype

Diff of /ruby-cache/MANUAL.rd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by okuji, Fri Nov 22 10:32:31 2002 UTC revision 1.2 by okuji, Thu Nov 28 10:16:03 2002 UTC
# Line 3  Line 3 
3  = Ruby/Cache Reference Manual  = Ruby/Cache Reference Manual
4    
5  This is the reference manual for  This is the reference manual for
6  ((<"Ruby/Cache"|URL:http://www.nongnu.org/pupa/ruby-cache.html>)) version 0.2.  ((<"Ruby/Cache"|URL:http://www.nongnu.org/pupa/ruby-cache.html>)) version 0.3.
7    
8  Ruby/Cache provides a class for caching arbitrary objects based on LRU  Ruby/Cache provides a class for caching arbitrary objects based on LRU
9  algorithm. The class (({Cache})) looks like a variant of (({Hash})), and,  algorithm. The class (({Cache})) looks like a variant of (({Hash})), and,
# Line 31  Enumerable Line 31  Enumerable
31      Return the version number.      Return the version number.
32    
33  --- Cache.new([max_obj_size, max_size, max_num, expiration, &hook])  --- Cache.new([max_obj_size, max_size, max_num, expiration, &hook])
34    --- Cache.new(hash, &hook)
35      Create a new Cache object.      Create a new Cache object.
36            
37      ((|max_obj_size|)) is the maximum size per object allowed to be cached.      ((|max_obj_size|)) is the maximum size per object allowed to be cached.
# Line 46  Enumerable Line 47  Enumerable
47            
48      ((|hook|)) is called whenever an object is invalidated, in the form      ((|hook|)) is called whenever an object is invalidated, in the form
49      (({hook(key, value)})). So you can use ((|hook|)) for cleanups.      (({hook(key, value)})). So you can use ((|hook|)) for cleanups.
50        
51        If the latter form is used, ((|hash|)) must be a Hash object, and it
52        represents keyword arguments. ((|hash|)) can have any combination of
53        these keys: (({:max_obj_size})), (({:max_size})), (({:max_num})) and
54        (({:expiration})). The meanings are the same as above.
55    
56  == Methods:  == Methods:
57    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26