Skip to content

Commit

Permalink
CACHEBOX-85 #resolve
Browse files Browse the repository at this point in the history
Remove Lock and Double `get` from getOrSet
  • Loading branch information
lmajano committed Nov 29, 2023
1 parent 8af80c5 commit 0a3d6e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/specs/cache/providers/CacheBoxProviderTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@
var cacheKey = "test-#createUUID()#";
var results = cache.getOrSet( objectKey = cacheKey, produce = cacheProducer );
assertTrue( structKeyExists( results, "name" ) );
assertEquals( 2, cache.getStats().getMisses() );
assertEquals( 1, cache.getStats().getMisses() );
assertEquals( 0, cache.getStats().getHits() );

var results = cache.getOrSet( objectKey = cacheKey, produce = cacheProducer );
assertTrue( structKeyExists( results, "name" ) );
assertEquals( 2, cache.getStats().getMisses() );
assertEquals( 1, cache.getStats().getMisses() );
assertEquals( 1, cache.getStats().getHits() );
}

Expand Down

0 comments on commit 0a3d6e0

Please sign in to comment.