PHP Class Elgg\Cache\Pool\StashWrapperTest

Inheritance: extends Elgg\TestCase, implements Elgg\Cache\Pool\TestCase
Show file Open project: elgg/elgg

Public Methods

Method Description
invalidKeyProvider ( )
testAcceptsStringAndIntKeys ( )
testEnablesStashStampedeProtection ( ) Stash recommends always calling $item->lock() on miss to make sure that the caching is as performant as possible by avoiding multiple simultaneous regenerations of the same value.
testGetComplainsAboutInvalidKeys ( $key )
testGetDoesNotRegenerateValueFromCallbackOnHit ( )
testGetRegeneratesValueFromCallbackOnMiss ( )
testInvalidateComplainsAboutInvalidKeys ( $key )
testInvalidateForcesTheSpecifiedValueToBeRegenerated ( )
testPutComplainsAboutInvalidKeys ( $key )

Method Details

invalidKeyProvider() public method

public invalidKeyProvider ( )

testAcceptsStringAndIntKeys() public method

testEnablesStashStampedeProtection() public method

http://www.stashphp.com/Invalidation.html#stampede-protection 1. Create a new cache 2. Get any entry 3. Check that Stash\Item::lock() was called 4. Get the same entry 5. Check that Stash\Item::lock() was *not* called

testGetComplainsAboutInvalidKeys() public method

testGetDoesNotRegenerateValueFromCallbackOnHit() public method

testGetRegeneratesValueFromCallbackOnMiss() public method

testInvalidateComplainsAboutInvalidKeys() public method

testInvalidateForcesTheSpecifiedValueToBeRegenerated() public method

testPutComplainsAboutInvalidKeys() public method