NAME

Generic::UI::Cache - A UI description cache module.

SYNOPSIS

# create new cache my $cache = new Generic::UI::Cache( -lang => , -ui => , -cfg => , -timeout => 3600, -locale => 'DE', );

# find out which data tables exists my @tables = $cache->get_tables();

# find out which fields exists in a particular table (order preserved) my @fields = $cache->get_fields(-table => 't_users');

# fetch some informations by type (as hashref) my $names = $cache->get_table_localization(-table => 't_users'); my $types = $cache->get_table_types(-table => 't_users');

# fetch all available informations about a table (order preserved) (as hashref) my $all = $cache->get_table_info(-table => 't_users');

# fetch specific informations about a particular field (as hashref) my $name = $cache->get_field_localization(-table => 't_users', -field => 'd_pass'); my $type = $cache->get_field_type(-table => 't_users', -field => 'd_pass');

# fetch all available informations about a particular field (as hashref) my $all = $cache->get_field_info(-table => 't_users', -field => 'd_pass');

# find out which locale is currently in use my $cur_lc = $cache->get_current_locale();

# find out the current configuration my $config = $cache->get_cfg();

# find messages for current locale for a particular table my %messages = get_messages(-table => 't_users');

DESCRIPTION

This is an internal module and will be used by apache modules for caching purposes. You normally should not need it directly.

This module caches the whole database description of a database. It also caches the locales and templates.

Since it is running under mod_perl, the information it contains is always available as long as the current apache child process it runs under is working.

You can set a timeout value, if the timeout is being reached, all the informations will be re-gathered.

METHODS

new();

Initialize the Cache.

Parameters: