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

Commit

Permalink
Merge branch 'feature/150' into develop
Browse files Browse the repository at this point in the history
Close #150
  • Loading branch information
weierophinney committed Apr 18, 2018
2 parents 4a835d4 + a78984b commit c62cbd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#150](https://github.com/zendframework/zend-cache/pull/150) fixes an issue with how CAS tokens are handled when using the memcached adapter.

- [#61](https://github.com/zendframework/zend-cache/pull/61)
Zend Data Cache: minTtl => 1

Expand Down
8 changes: 7 additions & 1 deletion src/Storage/Adapter/Memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,13 @@ protected function internalGetItem(& $normalizedKey, & $success = null, & $casTo
$internalKey = $this->namespacePrefix . $normalizedKey;

if (func_num_args() > 2) {
$result = $memc->get($internalKey, null, $casToken);
if (defined('Memcached::GET_EXTENDED')) {
$output = $memc->get($internalKey, null, \Memcached::GET_EXTENDED);
$casToken = $output['cas'];
$result = $output['value'];
} else {
$result = $memc->get($internalKey, null, $casToken);
}
} else {
$result = $memc->get($internalKey);
}
Expand Down

0 comments on commit c62cbd9

Please sign in to comment.