Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
prependBackend example
class
BackendChainTest
extends
GenericCacheBackendUnitTestBase
{
protected
function
createCacheBackend
(
$bin
)
{
$chain
=
new
BackendChain
(
)
;
// We need to create some various backends in the chain.
$chain
->
appendBackend
(
new
MemoryBackend
(
)
)
->
prependBackend
(
new
MemoryBackend
(
)
)
->
appendBackend
(
new
MemoryBackend
(
)
)
;
\Drupal::
service
(
'cache_tags.invalidator'
)
->
addInvalidator
(
$chain
)
;
return
$chain
;
}
}