Code Duplication    Length = 7-8 lines in 3 locations

app/code/community/Nexcessnet/Turpentine/Model/Observer/Ban.php 3 locations

@@ 171-177 (lines=7) @@
168
     * @param  Varien_Object $eventObject
169
     * @return null
170
     */
171
    public function banMediaCache($eventObject) {
172
        if (Mage::helper('turpentine/varnish')->getVarnishEnabled()) {
173
            $result = $this->_getVarnishAdmin()->flushUrl('media/(?:js|css)/');
174
            Mage::dispatchEvent('turpentine_ban_media_cache', $result);
175
            $this->_checkResult($result);
176
        }
177
    }
178
179
    /**
180
     * Flush catalog images cache, corresponds to same button in admin cache
@@ 189-196 (lines=8) @@
186
     * @param  Varien_Object $eventObject
187
     * @return null
188
     */
189
    public function banCatalogImagesCache($eventObject) {
190
        if (Mage::helper('turpentine/varnish')->getVarnishEnabled()) {
191
            $result = $this->_getVarnishAdmin()->flushUrl(
192
                'media/catalog/product/cache/' );
193
            Mage::dispatchEvent('turpentine_ban_catalog_images_cache', $result);
194
            $this->_checkResult($result);
195
        }
196
    }
197
198
    /**
199
     * Ban a specific CMS page from cache after edit
@@ 259-265 (lines=7) @@
256
     * @param  Varien_Object $eventObject
257
     * @return null
258
     */
259
    public function banAllCache($eventObject) {
260
        if (Mage::helper('turpentine/varnish')->getVarnishEnabled()) {
261
            $result = $this->_getVarnishAdmin()->flushAll();
262
            Mage::dispatchEvent('turpentine_ban_all_cache', $result);
263
            $this->_checkResult($result);
264
        }
265
    }
266
267
    /**
268
     * Do a flush on the ESI blocks