Class::Simple::Readonly::Cached - cache messages to an object
Version 0.01
A sub-class of Class::Simple which caches calls to read the status of an object that are otherwise expensive.
It is up to the caller to maintain the cache if the object comes out of sync with the cache, for example by changing its state.
Note that it only works on objects which doesn't change its state based on input
$val = $obj->val(); $val = $obj->val(a => 'b');
Creates a Class::Simple::Readonly::Cached object.
It takes one mandatory parameter: cache, which is an object which understands get() and set() calls, such as an CHI object.
It takes one optional argument: object, which is an object which is taken to be the object to be cached. If not given, an object of the class Class::Simple is instantiated and that is used.
Nigel Horne, <njh at bandsman.co.uk>
<njh at bandsman.co.uk>
Doesn't work with Memoize.
Please report any bugs or feature requests to bug-class-simple-readonly-cached at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Simple-Readonly-Cached. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-class-simple-readonly-cached at rt.cpan.org
params() returns a ref which means that calling routines can change the hash for other routines. Take a local copy before making amendments to the table if you don't want unexpected things to happen.
Class::Simple, CHI
You can find documentation for this module with the perldoc command.
perldoc Class::Simple::Readonly::Cached
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Class-Simple-Readonly-Cached
CPAN Ratings
http://cpanratings.perl.org/d/Class-Simple-Readonly-Cached
Search CPAN
http://search.cpan.org/dist/Class-Simple-Readonly-Cached/
Author Nigel Horne: njh@bandsman.co.uk Copyright (C) 2019, Nigel Horne
njh@bandsman.co.uk
Usage is subject to licence terms. The licence terms of this software are as follows: Personal single user, single computer use: GPL2 All other users (including Commercial, Charity, Educational, Government) must apply in writing for a licence for use from Nigel Horne at the above e-mail.
To install Class::Simple::Readonly::Cached, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Simple::Readonly::Cached
CPAN shell
perl -MCPAN -e shell install Class::Simple::Readonly::Cached
For more information on module installation, please visit the detailed CPAN module installation guide.