<<

NAME

Koha::Cache::Object - Tie-able class for caching objects

SYNOPSIS

    my $cache = Koha::Cache->new();
    my $scalar = Koha::Cache->create_scalar(
        {
            'key'         => 'whatever',
            'timeout'     => 2,
            'constructor' => sub { return 'stuff'; },
        }
    );
    my %hash = Koha::Cache->create_hash(
        {
            'key'         => 'whateverelse',
            'timeout'     => 2,
            'constructor' => sub { return { 'stuff' => 'nonsense' }; },
        }
    );

DESCRIPTION

Do not use this class directly. It is tied to variables by Koha::Cache for transparent cache access. If you choose to ignore this warning, you should be aware that it is disturbingly polymorphic and supports both scalars and hashes, with arrays a potential future addition.

TIE METHODS

SEE ALSO

Koha::Cache, tie, perltie

AUTHOR

Jared Camins-Esakov, <jcamins@cpbibliography.com>

<<