Skip to content

Commit

Permalink
Refill large var caches below var_limit values
Browse files Browse the repository at this point in the history
Fall back on hard-coded value of 3 in case var_limit is set to 0 (no limit).

Better fixes #61
  • Loading branch information
dgw committed Oct 25, 2015
1 parent 5a9b1d0 commit 5dad769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bucket.pl
Expand Up @@ -3234,7 +3234,8 @@ sub expand {
$replacement = &set_case( $var, $replacement );
$replacement = A($replacement) if $2;

if ( exists $record->{cache} and 3 > @{$record->{cache}} ) {
if ( exists $record->{cache} and
@{$record->{cache}} < (&config("var_limit") or 3) ) {
Log "Refilling cache for $var";
&sql(
'select vars.id id, name, perms, type, value
Expand Down

0 comments on commit 5dad769

Please sign in to comment.