GemsTracker / gemstracker-library

GEneric Medical Survey Tracker, main library
http://gemstracker.org
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Fix cache issue #870

Closed rvm-peercode closed 7 months ago

rvm-peercode commented 7 months ago

In some cases, the cache layer would return values even if those values should not have been returned because their tags had been invalidated. This could happen if you would call $this->cache->getCacheItem($cacheKey); without wrapping that call inside an if block if ($this->cache->hasItem($cacheKey)) { }

Now getCacheItem() will no longer return a result if the item is invalidated, so it is no longer necessary to check with hasItem().