NAME

Sub::Contract::Memoizer - Implement the caching behaviour of a contract

SYNOPSIS

See 'Sub::Contract'.

DESCRIPTION

Subroutine contracts defined with Sub::Contract can memoize the contractor's results. This optional behaviour is implemented in Sub::Contract::Memoizer.

API

See 'Sub::Contract'.

$contract->cache([size => $max_size])
$contract->has_cache([size => $max_size])
$contract->get_cache
$contract->clear_cache
$contract->add_to_cache(\@args, \@results)

SEE ALSO

See 'Sub::Contract'.

VERSION

$Id: Memoizer.pm,v 1.12 2009/06/16 12:23:58 erwan_lemonnier Exp $

AUTHOR

Erwan Lemonnier <erwan@cpan.org>

LICENSE

See Sub::Contract.