Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 148-159 (lines=12) @@
145
     * @param  Varien_Object $eventObject
146
     * @return null
147
     */
148
    public function banCategoryCache($eventObject) {
149
        if (Mage::helper('turpentine/varnish')->getVarnishEnabled()) {
150
            $category = $eventObject->getCategory();
151
            $result = $this->_getVarnishAdmin()->flushUrl($category->getUrlKey());
152
            Mage::dispatchEvent('turpentine_ban_category_cache', $result);
153
            $cronHelper = Mage::helper('turpentine/cron');
154
            if ($this->_checkResult($result) &&
155
                    $cronHelper->getCrawlerEnabled()) {
156
                $cronHelper->addCategoryToCrawlerQueue($category);
157
            }
158
        }
159
    }
160
161
    /**
162
     * Clear the media (CSS/JS) cache, corresponds to the buttons on the cache
@@ 207-218 (lines=12) @@
204
     * @param  Varien_Object $eventObject
205
     * @return null
206
     */
207
    public function banCmsPageCache($eventObject) {
208
        if (Mage::helper('turpentine/varnish')->getVarnishEnabled()) {
209
            $pageId = $eventObject->getDataObject()->getIdentifier();
210
            $result = $this->_getVarnishAdmin()->flushUrl($pageId.'(?:\.html?)?\/?$');
211
            Mage::dispatchEvent('turpentine_ban_cms_page_cache', $result);
212
            $cronHelper = Mage::helper('turpentine/cron');
213
            if ($this->_checkResult($result) &&
214
                    $cronHelper->getCrawlerEnabled()) {
215
                $cronHelper->addCmsPageToCrawlerQueue($pageId);
216
            }
217
        }
218
    }
219
220
    /**
221
     * Ban a specific CMS page revision from cache after edit (enterprise edition only)