Code::TidyAll::CacheModel - Caching model for Code::TidyAll
version 0.61
my $cache_model = Cody::TidyAll::CacheModel->new( cache_engine => Code::TidyAll::Cache->new(...), path => '/path/to/file/to/cache', ); # check cache print 'Yes!' if $cache_model->is_cached; # update cache $cache_model->clear_file_contents; $cache_model->update; # update the cache when you know the file contents $cache_model->file_contents($new_content); $cache_model->update; # force removal from cache $cache_model->remove;
A cache model for Code::TidyAll. Different subclasses can employ different caching techniques.
The basic model implemented here is simple; It stores in the cache a hash key of the file contents keyed by a hash key of the file's path.
The full path to the file on disk
The local path to the file (i.e. what the cache system will consider the canonical name of the file)
A Code::TidyAll::Cache compatible instance, or, if no caching is required undef.
Code::TidyAll::Cache
A base signature.
A flag indicating if this is cached. By default checks that the cache key and cache value match the cache.
The computed cache key for the file
The computed cache value for the file
Updates the cache
Attempts to remove the value from the cache
Bugs may be submitted at https://github.com/houseabsolute/perl-code-tidyall/issues.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Code-TidyAll can be found at https://github.com/houseabsolute/perl-code-tidyall.
Jonathan Swartz <swartz@pobox.com>
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2011 - 2017 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.
To install Code::TidyAll, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Code::TidyAll
CPAN shell
perl -MCPAN -e shell install Code::TidyAll
For more information on module installation, please visit the detailed CPAN module installation guide.