Class CacheManager
In: lib/storage/cache.rb
Parent: Object
CacheStats
CacheManager
CacheEntry
TopLevel

This class manages the cache. It is initialized by the Store and front ends the database behind the Store.

Methods

delete   get   hash   inspect   keys   makenoswap   makeswap   mark   new   put   stats   sync   sync_chain  

Public Class methods

Public Instance methods

delete an object

gets an object

oid
- integer object id to retrieve
return
- a reference to the object or nil if none exists

Our simple hash algoritm. Our database keys are sequentially assigned integers, so… I don’t know what would be better.

report on the cache map see cmd_dumpcache

This is provided to traverse the entire object chain. This thrashes the cache violently. See Store#each. One needs to question the design of routines that use Store#each above.

Mark an object in the cache as nonswappable

oid
is the object id
return
undefined

Mark an object in the cache as swappable

oid
is the object id
return
undefined

deliberately mark an object in the cache as dirty see properties.

puts an object

obj
- The integer object id to retrieve
return
- undefined

produce a report - see cmd_stats

syncronize the entire cache with the database called by save.

syncronize a specific list chain not yet called but included for possible performance enhancement

[Validate]