Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
cas example
// no luck, with concurrency, someone else acquire the lock
throw
new
LockConflictedException
(
)
;
}
// Someone else steal the lock
if
(
$value
!==
$token
)
{
throw
new
LockConflictedException
(
)
;
}
if
(
!
$this
->memcached->
cas
(
$cas
,
(string)
$key
,
$token
,
$ttl
)
)
{
throw
new
LockConflictedException
(
)
;
}
$this
->
checkNotExpired
(
$key
)
;
}
/** * @return void */
public
function
delete
(
Key
$key
)
{