Code Duplication    Length = 11-19 lines in 2 locations

src/Comodojo/Cache/Drivers/Memcached.php 1 location

@@ 117-127 (lines=11) @@
114
    /**
115
     * {@inheritdoc}
116
     */
117
    public function delete($key, $namespace) {
118
119
        $scope = $this->getNamespaceKey($namespace);
120
121
        if ( $scope === false ) return false;
122
123
        $shadowName = "$scope-$key";
124
125
        return $this->getInstance()->delete($shadowName);
126
127
    }
128
129
    /**
130
     * {@inheritdoc}

src/Comodojo/Cache/Drivers/PhpRedis.php 1 location

@@ 149-167 (lines=19) @@
146
    /**
147
     * {@inheritdoc}
148
     */
149
    public function delete($key, $namespace) {
150
151
        try {
152
153
            $scope = $this->getNamespaceKey($namespace);
154
155
            if ( $scope === false ) return false;
156
157
            $shadowName = "$scope-$key";
158
159
            return (bool) $this->getInstance()->delete($shadowName);
160
161
        } catch (RedisException $re) {
162
163
            throw $re;
164
165
        }
166
167
    }
168
169
    /**
170
     * {@inheritdoc}