Apache-Cache

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

            $cache->set(Key => $value, $expires_in);
        }
        elsif($cache->status eq FAILURE)
        {
            # don't use cache, cache maybe busy by another child or something goes wrong
            $value = get_my_data('Key');
        }

DESCRIPTION
    This module allows you to cache data easily through shared memory.
    Whithin the framework of an apache/mod_perl use, this cache is
    accessible from any child process. The data validity is managed in the
    Cache::Cache model, but as well based on time than on size or number of
    keys.

    Additionnally, you can implement a cache with Apache::Cache in your
    module without the risk of namespace clash because Apache::Cache is
    enclosed in the constructor's package's caller (see the
    Apache::SharedMem manpage for more details).

USAGE

lib/Apache/Cache.pm  view on Meta::CPAN

        $cache->set(Key => $value, $expires_in);
    }
    elsif($cache->status eq FAILURE)
    {
        # don't use cache, cache maybe busy by another child or something goes wrong
        $value = get_my_data('Key');
    }

=head1 DESCRIPTION

This module allows you to cache data easily through shared memory. Whithin the framework 
of an apache/mod_perl use, this cache is accessible from any child process. The data 
validity is managed in the Cache::Cache model, but as well based on time than on size 
or number of keys.

Additionnally, you can implement a cache with Apache::Cache in your module without the risk
of namespace clash because Apache::Cache is enclosed in the constructor's package's caller 
(see L<Apache::SharedMem> for more details).

=head1 USAGE



( run in 0.691 second using v1.01-cache-2.11-cpan-df04353d9ac )