Skip to content

srchulo/Mojo-Cache-Role-Exists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Mojo::Cache::Role::Exists - Check if keys exist in the cache

STATUS

SYNOPSIS

my $cache = Mojo::Cache->new->with_roles('+Exists');
if ($cache->exists('key')) {
  ...
}

DESCRIPTION

Mojo::Cache::Role::Exists allows you to check if keys exist in the cache via the "exists" method. Keys may not exist because they were never "set" in Mojo::Cache, or because they have been evicted from the cache.

METHODS

exists

if ($cache->exists('key')) {
  ...
}

Returns true if a cached value exists for the provided key, false otherwise.

AUTHOR

Adam Hopkins srchulo@cpan.org

COPYRIGHT

Copyright 2019- Adam Hopkins

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

About

Check if keys exist in the cache

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages