@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | if (empty($keys)) {
|
| 57 | 57 | $ucacheInfo = wincache_ucache_info(false); |
| 58 | 58 | |
| 59 | - foreach ($ucacheInfo[ 'ucache_entries' ] as $item) {
|
|
| 60 | - $items[] = $this->getItem(str_replace($this->prefixKey, '', $item[ 'key_name' ])); |
|
| 59 | + foreach ($ucacheInfo['ucache_entries'] as $item) {
|
|
| 60 | + $items[] = $this->getItem(str_replace($this->prefixKey, '', $item['key_name'])); |
|
| 61 | 61 | } |
| 62 | 62 | } elseif (count($keys)) {
|
| 63 | 63 | foreach ($keys as $key) {
|
@@ -188,8 +188,8 @@ discard block |
||
| 188 | 188 | public function save(CacheItemInterface $item) |
| 189 | 189 | {
|
| 190 | 190 | $metadata = $item->getMetadata(); |
| 191 | - $metadata[ 'data' ] = $item->get(); |
|
| 191 | + $metadata['data'] = $item->get(); |
|
| 192 | 192 | |
| 193 | - return wincache_ucache_set($this->prefixKey . $item->getKey(), $metadata, $metadata[ 'ttl' ]); |
|
| 193 | + return wincache_ucache_set($this->prefixKey . $item->getKey(), $metadata, $metadata['ttl']); |
|
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | \ No newline at end of file |
@@ -95,11 +95,11 @@ |
||
| 95 | 95 | $this->key = $key; |
| 96 | 96 | |
| 97 | 97 | // Set from item metadata |
| 98 | - if (isset($value[ 'ctime' ]) AND isset($value[ 'etime' ]) AND isset($value[ 'ttl' ]) AND isset($value[ 'data' ])) {
|
|
| 99 | - $this->set($value[ 'data' ]); |
|
| 100 | - $this->createdAt = new \DateTime(date('r', $value[ 'ctime' ]));
|
|
| 101 | - $this->expiresAt = new \DateTime(date('r', $value[ 'etime' ]));
|
|
| 102 | - $this->expiresAfter($value[ 'ttl' ]); |
|
| 98 | + if (isset($value['ctime']) AND isset($value['etime']) AND isset($value['ttl']) AND isset($value['data'])) {
|
|
| 99 | + $this->set($value['data']); |
|
| 100 | + $this->createdAt = new \DateTime(date('r', $value['ctime']));
|
|
| 101 | + $this->expiresAt = new \DateTime(date('r', $value['etime']));
|
|
| 102 | + $this->expiresAfter($value['ttl']); |
|
| 103 | 103 | } else {
|
| 104 | 104 | // Set item value |
| 105 | 105 | $this->set($value); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $apcIterator = new \APCUIterator(); |
| 57 | 57 | |
| 58 | 58 | foreach ($apcIterator as $item) {
|
| 59 | - $items[] = new Item(str_replace($this->prefixKey, '', $item[ 'key' ]), $item[ 'value' ]); |
|
| 59 | + $items[] = new Item(str_replace($this->prefixKey, '', $item['key']), $item['value']); |
|
| 60 | 60 | } |
| 61 | 61 | } elseif (count($keys)) {
|
| 62 | 62 | foreach ($keys as $key) {
|
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | public function save(CacheItemInterface $item) |
| 191 | 191 | {
|
| 192 | 192 | $metadata = $item->getMetadata(); |
| 193 | - $metadata[ 'data' ] = $item->get(); |
|
| 193 | + $metadata['data'] = $item->get(); |
|
| 194 | 194 | |
| 195 | - return apcu_store($this->prefixKey . $item->getKey(), $metadata, $metadata[ 'ttl' ]); |
|
| 195 | + return apcu_store($this->prefixKey . $item->getKey(), $metadata, $metadata['ttl']); |
|
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | \ No newline at end of file |
@@ -29,9 +29,9 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function __construct(array $config) |
| 31 | 31 | {
|
| 32 | - if (isset($config[ 'default' ])) {
|
|
| 32 | + if (isset($config['default'])) {
|
|
| 33 | 33 | foreach ($config as $poolOffset => $poolConfig) {
|
| 34 | - $config[ $poolOffset ] = new self($poolConfig); |
|
| 34 | + $config[$poolOffset] = new self($poolConfig); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | foreach ($items as $key => $item) {
|
| 101 | 101 | if ($this->save($item) === true) {
|
| 102 | - unset($items[ $key ]); |
|
| 102 | + unset($items[$key]); |
|
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | foreach ($keys as $key) {
|
| 133 | 133 | if ($this->has($key)) {
|
| 134 | - $result[ $key ] = $this->get($key, $default); |
|
| 134 | + $result[$key] = $this->get($key, $default); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | foreach ($values as $key => $value) {
|
| 202 | 202 | if ($this->set($key, $value, $ttl)) {
|
| 203 | - $result[ $key ] = true; |
|
| 203 | + $result[$key] = true; |
|
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | |