Class-DBI-Cacheable
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Class/DBI/Cacheable.pm view on Meta::CPAN
update action on to L<Class::DBI>, after which the object is refreshed in the
cache. This ensures that, if database data is altered, the cache will always
accurately reflect the database contents.
Note: this will only work properly when updates are made through L<Class::DBI::Cachable>.
If changes are made to the database via direct SQL calls the cache will be out-of-sync
with the real database.
=cut
sub update {
my $self = shift;
my $key = $self->getCacheKey;
my $result = $self->SUPER::update(@_);
$self->setCache($key);
return $result;
}
=head1 TIPS AND USAGE NOTES
Most customization for this package is possible by overriding the class
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.647 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )