Skip to content

Commit

Permalink
Item14237: A little perfomance fix for caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Mar 23, 2017
1 parent 7b6ef20 commit 20a5e51
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/lib/Foswiki/Config/Spec/File.pm
Expand Up @@ -126,11 +126,13 @@ pluggable parse => sub {

# Don't run twice for the same file.
unless ( $this->parsed ) {
my $cfg = $this->cfg;
my $cachedData = $this->cacheFile->specData;
my $cfg = $this->cfg;
my $cachedData;
my @specs;

if ( $cachedData && $this->validCache ) {
$cachedData = $this->cacheFile->specData if $this->validCache;

if ($cachedData) {
@specs = @{$cachedData};
}
else {
Expand Down

0 comments on commit 20a5e51

Please sign in to comment.