mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Reducing key length when using groups in WincacheEngine
This commit is contained in:
parent
afba5aafb7
commit
2bb3dc6bf7
1 changed files with 6 additions and 7 deletions
|
@ -150,15 +150,13 @@ class WincacheEngine extends CacheEngine {
|
|||
* @return array
|
||||
**/
|
||||
public function groups() {
|
||||
$groups = $this->_compiledGroupNames;
|
||||
if (empty($groups)) {
|
||||
if (empty($this->_compiledGroupNames)) {
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
$groups[] = $this->settings['prefix'] . $group;
|
||||
$this->_compiledGroupNames[] = $this->settings['prefix'] . $group;
|
||||
}
|
||||
$this->_compiledGroupNames = $groups;
|
||||
}
|
||||
$groups = wincache_ucache_get($groups);
|
||||
|
||||
$groups = wincache_ucache_get($this->_compiledGroupNames);
|
||||
if (count($groups) !== count($this->settings['groups'])) {
|
||||
foreach ($this->_compiledGroupNames as $group) {
|
||||
if (!isset($groups[$group])) {
|
||||
|
@ -170,8 +168,9 @@ class WincacheEngine extends CacheEngine {
|
|||
}
|
||||
|
||||
$result = array();
|
||||
foreach ($groups as $group => $value) {
|
||||
$result[] = $group . $value;
|
||||
$groups = array_values($groups);
|
||||
foreach ($this->settings['groups'] as $i => $group) {
|
||||
$result[] = $group . $groups[$i];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue