Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Add cas operation for apc adapter #4844

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions library/Zend/Cache/Storage/Adapter/Apc.php
Expand Up @@ -734,4 +734,19 @@ protected function normalizeMetadata(array & $metadata)
$metadata['num_hits']
);
}

/**
* Internal method to set an item only if token matches
*
* @param mixed $token
* @param string $normalizedKey
* @param mixed $value
* @return bool
* @see getItem()
* @see setItem()
*/
protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
{
return apc_cas($normalizedKey, $token, $value);
}
}