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

CacheItem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A set() 0 5 1
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