Completed
Push — stash_0.6_save_fix ( e5bc02 )
by André
23:10
created

CacheItem::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
<?php
2
3
/**
4
 * File containing the CacheItem class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\Persistence\Cache;
10
11
use Tedivm\StashBundle\Service\CacheItem as StashBundleCacheItem;
12
13
/**
14
 * Class CacheItem
15
 *
16
 * Overrides set() to also call save() to behave like Stash < v0.6 did for bc.
17
 */
18
class CacheItem extends StashBundleCacheItem
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function set($value)
24
    {
25
        parent::set($value);
26
        $this->save();
27
    }
28
}
29