/[pupa]/ruby-cache/lib/cache.rb
ViewVC logotype

Diff of /ruby-cache/lib/cache.rb

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

revision 1.1.1.1 by okuji, Fri Aug 23 05:27:42 2002 UTC revision 1.2 by okuji, Sat Nov 16 21:25:16 2002 UTC
# Line 58  class Cache Line 58  class Cache
58      obj = @objs[key]      obj = @objs[key]
59            
60      if @hook      if @hook
61        @hook.yield(key, obj)        @hook.call(key, obj)
62      end      end
63            
64      @size -= obj.size      @size -= obj.size
# Line 75  class Cache Line 75  class Cache
75    def invalidate_all()    def invalidate_all()
76      if @hook      if @hook
77        @objs.each do |key, obj|        @objs.each do |key, obj|
78          @hook.yield(key, obj)          @hook.call(key, obj)
79        end        end
80      end      end
81    
# Line 83  class Cache Line 83  class Cache
83      @list.clear      @list.clear
84      @size = 0      @size = 0
85    end    end
86    alias :clear, :invalidate_all    alias :clear :invalidate_all
87        
88    def expire()    def expire()
89      if @expiration      if @expiration

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

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