File Coverage

blib/lib/Pithub/Result/SharedCache.pm
Criterion Covered Total %
statement 7 10 70.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 2 2 100.0
total 12 16 75.0


line stmt bran cond sub pod time code
1             package Pithub::Result::SharedCache;
2             our $AUTHORITY = 'cpan:PLU';
3              
4 23     23   185326 use Moo::Role;
  23         51  
  23         147  
5              
6             our $VERSION = '0.01039';
7             # ABSTRACT: A role to share the LRU cache with all Pithub objects
8              
9 23     23   19077 use CHI ();
  23         769114  
  23         2046  
10              
11             my $store = {};
12              
13             my $Shared_Cache = CHI->new(
14             datastore => $store,
15             driver => 'RawMemory',
16             max_size => 200,
17             size => 200,
18             );
19              
20              
21             sub shared_cache {
22 1136     1136 1 5481 return $Shared_Cache;
23             }
24              
25              
26             sub set_shared_cache {
27 0     0 1   my($self, $cache) = @_;
28              
29 0           $Shared_Cache = $cache;
30              
31 0           return;
32             }
33              
34             1;
35              
36             __END__