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])

TODO

$contract->has_cache([size => $max_size])

TODO

$contract->get_cache

Returns the instance of Cache used by this contract.

$contract->clear_cache

TODO

$contract->add_to_cache(\@args, \@results)

TODO

SEE ALSO

See 'Sub::Contract'.

VERSION

$Id: Memoizer.pm,v 1.5 2008/06/16 14:49:03 erwan_lemonnier Exp $

AUTHOR

Erwan Lemonnier <erwan@cpan.org>

LICENSE

See Sub::Contract.