Skip to content

Commit

Permalink
Merge pull request #67 from dgw/early-var-cache-refill
Browse files Browse the repository at this point in the history
Don't wait until empty to refill var cache
  • Loading branch information
zigdon committed Oct 25, 2015
2 parents 33393a2 + 5dad769 commit 48938ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bucket.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3234,7 +3234,8 @@ sub expand {
$replacement = &set_case( $var, $replacement );
$replacement = A($replacement) if $2;

if ( exists $record->{cache} and not @{$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 48938ee

Please sign in to comment.