This file is indexed.

/usr/share/perl5/Catalyst/Plugin/Cache/Choose/KeyRegexes.pm is in libcatalyst-plugin-cache-perl 0.12-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/perl

package Catalyst::Plugin::Cache::Choose::KeyRegexes;

use strict;
use warnings;
use MRO::Compat;

sub setup {
    my $app = shift;
    my $ret = $app->maybe::next::method( @_ );

    my $regexes = $app->_get_cache_plugin_config->{key_regexes} ||= [];

    die "the regex list must be an array containing regexex/backend pairs" unless ref $regexes eq "ARRAY";

    $ret;
}

sub get_cache_key_regexes {
    my ( $c, %meta ) = @_;
    @{ $c->_get_cache_plugin_config->{key_regexes} };
}

sub choose_cache_backend {
    my ( $c, %meta ) = @_;

    my @regexes = $c->get_cache_key_regexes( %meta );

    while ( @regexes and my ( $re, $backend ) = splice( @regexes, 0, 2 ) ) {
        return $backend if $meta{key} =~ $re;
    }

    $c->maybe::next::method( %meta );
}

__PACKAGE__;

__END__

=pod

=head1 NAME

Catalyst::Plugin::Cache::Choose::KeyRegex - Choose a cache backend based on key regexes.

=head1 SYNOPSIS

	use Catalyst::Plugin::Cache::Choose::KeyRegex;

=head1 DESCRIPTION

=cut