Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
jodydonetti committed Jun 4, 2024
1 parent a7d0f15 commit a4a43c2
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ public IFusionCache Cache
if (_cache is not null)
return _cache;

if (_cacheFactory is not null)
lock (_mutex)
{
lock (_mutex)
{
return _cache = _cacheFactory();
}
}
if (_cache is not null)
return _cache;

if (_cacheFactory is null)
throw new InvalidOperationException("No cache and no cache factory specified: this should not be possible.");

throw new InvalidOperationException("This should not be possible");
return _cache = _cacheFactory();
}
}
}

Expand Down

0 comments on commit a4a43c2

Please sign in to comment.