Code Duplication    Length = 14-15 lines in 2 locations

WebStream/Cache/Driver/Apcu.php 1 location

@@ 71-85 (lines=15) @@
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function delete($key): bool
72
    {
73
        if (!$this->isAvailableCacheLibrary()) {
74
            return false;
75
        }
76
        $key = $this->cacheContainer->cachePrefix . $key;
77
78
        if (apcu_delete($key)) {
79
            $this->logger->info("Execute cache cleared: " . $key);
80
            return true;
81
        } else {
82
            $this->logger->warn("Failed to clear cache: " . $key);
83
            return false;
84
        }
85
    }
86
87
    /**
88
     * {@inheritdoc}

WebStream/Cache/Driver/Redis.php 1 location

@@ 88-101 (lines=14) @@
85
    /**
86
     * {@inheritdoc}
87
     */
88
    public function delete($key): bool
89
    {
90
        if (!$this->isAvailableCacheLibrary()) {
91
            return false;
92
        }
93
94
        if ($this->cacheContainer->driver->delete($key)) {
95
            $this->logger->info("Execute cache cleared: " . $key);
96
            return true;
97
        } else {
98
            $this->logger->warn("Failed to clear cache: " . $key);
99
            return false;
100
        }
101
    }
102
103
    /**
104
     * {@inheritdoc}