ClearElasticFieldCacheExtension::onAfterInit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
namespace SilverStripe\Elastica;
3
4
class ClearElasticFieldCacheExtension extends \Extension {
5
	public function onAfterInit() {
6
		$cache = \SS_Cache::factory('elasticsearch');
7
		$cache->clean();
8
	}
9
}
10