Class

Cache

Extends:

A simple cache for XML documents that were already transformed by xml_in.

Public Methods
new Creates and initializes a new Cache object.
restore_mem_copy Restores a data structure from a memory cache. If restoring the data structure failed for any reason, nil will be returned.
restore_mem_share Restores a data structure from a shared memory cache. You should consider these elements as "read only". If restoring the data structure failed for any reason, nil will be returned.
restore_storable Restores a data structure from a file. If restoring the data structure failed for any reason, nil will be returned.
save_mem_copy Copies a data structure to a memory cache.
save_mem_share Saves a data structure in a shared memory cache.
save_storable Saves a data structure into a file.
Private Methods
get_cache_filename Returns the "cache filename" belonging to a filename, i.e. the extension ’.xml’ in the original filename will be replaced by ’.stor’. If filename does not have this extension, ’.stor’ will be appended.
get_from_memory_cache Returns a cache entry from a memory cache belonging to a certain filename. If no entry could be found for any reason, nil will be returned.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.