Project

General

Profile

Defect #2285

Updated by Radek Tomiška almost 4 years ago

Not cached or cached null value is not different: 
 <pre><code class="java"> 
 return cache == null ? Optional.empty() : Optional.ofNullable(cache.get()); 
 </code></pre> 
 leads to Optional.empty() in both cases (if cached value - cache.get() - is null) => null values are not recognised as cached and value is loaded repetitivelly. 

 Cache manager interface has to be changed - Optional schould be removed => null value can be returned. returned => caller 

Back