PHP Class Elgg\Cache\Pool\StashWrapperTest

Inheritance: extends Elgg\TestCase, implements Elgg\Cache\Pool\TestCase
Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Méthode 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 méthode

public invalidKeyProvider ( )

testAcceptsStringAndIntKeys() public méthode

testEnablesStashStampedeProtection() public méthode

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 méthode

testGetDoesNotRegenerateValueFromCallbackOnHit() public méthode

testGetRegeneratesValueFromCallbackOnMiss() public méthode

testInvalidateComplainsAboutInvalidKeys() public méthode

testInvalidateForcesTheSpecifiedValueToBeRegenerated() public méthode

testPutComplainsAboutInvalidKeys() public méthode