LS::Cache::Config - Configuration loader for LSID Cache manager


lsid-perl documentation  | view source Contained in the lsid-perl distribution.

Index


NAME

Top

LS::Cache::Config - Configuration loader for LSID Cache manager

SYNOPSIS

Top

 # Create a new configuration with the default settings, overridden
 # by those in /tmp/cache
 my $config = new LS::Cache::Config('cache-root-dir' => '/tmp/cache');

 print "Log filename: " . $config->get_config_entry('log-file');

DESCRIPTION

Top

The Cache configuration object holds all configuration parameters for the LSID cache manager. Additionally, it can read and validate cache settings from directories.

CONSTRUCTORS

Top

new ( %options )

Create a new cache configuration object with the specified options:

 cache-root-dir: The root cache directory.
 log-file: The log file name.

METHODS

Top

get_config_entry ( $entry_name )

Returns the value that the configuration entry holds.

update_config ( $config_object_ref )

Update the configuration object's settings based on the reference passed. This could just be a hash with the appropriate keys set, it does not need to be an object.

read_cache_settings( $directory, $config_object_ref )

Read the directory's cache settings in to the specified configuration object. Invalid cache settings will be ignored.

COPYRIGHT

Top


lsid-perl documentation  | view source Contained in the lsid-perl distribution.