Class: XmlSimple::Cache

Class | XmlSimple::Cache
In: | lib/xmlsimple.rb
Parent: | Object

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

### Methods

new restore_mem_copy restore_mem_share restore_storable save_mem_copy save_mem_share save_storable

### Public Class methods

new()

Creates and initializes a new Cache object.

### Public Instance methods

restore_mem_copy(filename)

Restores a data structure from a memory cache. If restoring the data structure failed for any reason, nil will be returned.

filename: | Name of the file belonging to the data structure.

restore_mem_share(filename)

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.

filename: | Name of the file belonging to the data structure.

restore_storable(filename)

Restores a data structure from a file. If restoring the data structure failed for any reason, nil will be returned.

filename: | Name of the file belonging to the data structure.

save_mem_copy(data, filename)

Copies a data structure to a memory cache.

data: | Data structure to be copied.
filename: | Name of the file belonging to the data structure.

save_mem_share(data, filename)

Saves a data structure in a shared memory cache.

data: | Data structure to be saved.
filename: | Name of the file belonging to the data structure.

save_storable(data, filename)

Saves a data structure into a file.

data: | Data structure to be saved.
filename: | Name of the file belonging to the data structure.

[Validate]