| Class | CacheEntry |
| In: |
lib/storage/cache.rb
|
| Parent: | Object |
This is a node in the cache and is a wrapper for the object and keeps flags on the status of the entry.
| obj | [RW] | |
| oid | [RW] |
perhaps add LRU counters as CacheEntry is pretty dumb
# File lib/storage/cache.rb, line 59 def initialize(oid=nil,obj=nil,dirty=false,noswap=false) @oid, @obj, @dirty, @noswap = oid, obj, dirty, noswap end
A dead cache entry is an object that has been deleted
# File lib/storage/cache.rb, line 77 def dead? @obj == nil end
dirty cache entries are those that probably differ from the database
# File lib/storage/cache.rb, line 64 def dirty? @dirty end
# File lib/storage/cache.rb, line 81 def mark_dead @obj = nil @oid = nil @dirty = false @noswap = false end