View | Details | Raw Unified | Return to bug 9967
Collapse All | Expand All

(-)a/C4/Koha.pm (-8 / +7 lines)
Lines 1140-1155 sub GetAuthorisedValues { Link Here
1140
    # what it's for.
1140
    # what it's for.
1141
1141
1142
    # Is this cached already?
1142
    # Is this cached already?
1143
    $opac = $opac ? 1 : 0; # normalise to be safe
1143
    $opac = $opac ? 1 : 0;    # normalise to be safe
1144
    my $branch_limit =
1145
      C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
1144
    my $selected_key = defined($selected) ? $selected : '';
1146
    my $selected_key = defined($selected) ? $selected : '';
1145
    my $cache_key = "AuthorisedValues-$category-$selected_key-$opac";
1147
    my $cache_key =
1146
    my $cache     = Koha::Cache->get_instance();
1148
      "AuthorisedValues-$category-$selected_key-$opac-$branch_limit";
1147
    my $result    = $cache->get_from_cache($cache_key);
1149
    my $cache  = Koha::Cache->get_instance();
1148
warn "fetched $result from cache";
1150
    my $result = $cache->get_from_cache($cache_key);
1149
    return $result if $result;
1151
    return $result if $result;
1150
1152
1151
    my $branch_limit =
1152
      C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
1153
    my @results;
1153
    my @results;
1154
    my $dbh      = C4::Context->dbh;
1154
    my $dbh      = C4::Context->dbh;
1155
    my $query = qq{
1155
    my $query = qq{
1156
- 

Return to bug 9967