NAME
IO::Iron::IronCache::Policy - Base package (inherited) for IronCache::Client package.
VERSION
version 0.14
SYNOPSIS
# new() in the inheriting sub class.
sub new {
my ($class, $params) = @_;
my $self = IO::Iron::IronCache::Policy->new();
# Add more keys to the self hash.
my @self_keys = (
'caches', # References to all objects created of class IO::Iron::IronCache::Cache.
legal_keys(%{$self}),
);
unlock_keys(%{$self});
lock_keys_plus(%{$self}, @self_keys);
my @caches;
$self->{'caches'} = \@caches;
unlock_keys(%{$self});
bless $self, $class;
lock_keys(%{$self}, @self_keys);
return $self;
}
METHODS
is_cache_name_alternatives
is_item_key_alternatives
cache_name_alternatives
Return all possible cache name alternatives according to the current policy.
[No parameters.]
Return: list of cache name alternatives
Will throw NoIronPolicyException if there is no limit to the alternatives.
item_key_alternatives
Return all possible item key alternatives according to the current policy.
[No parameters.]
Return: list of item key alternatives
Will throw NoIronPolicyException if there is no limit to the alternatives.
is_valid_cache_name
Check if the cache name is valid according to the policy. Return 1/0.
validate_cache_name
Same as above but if validation fails, throws IronPolicyException. If valid, returns undefined.
is_valid_item_key
Check if the item key is valid according to the policy. Return 1/0.
validate_item_key
Same as above but if validation fails, throws IronPolicyException. If valid, returns undefined.
AUTHOR
Mikko Koivunalho <mikko.koivunalho@iki.fi>
BUGS
Please report any bugs or feature requests to bug-io-iron@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=IO-Iron
COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by Mikko Koivunalho.
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.