Completed
Push — master ( 0f9479...65c76e )
by Angus
02:49
created

Cacher::initiate_cache()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed');
2
3
//Because we can't autoload the cache driver with params - https://forum.codeigniter.com/thread-62217-post-319687.html#pid319687
4
class Cacher {
5
	protected $CI;
6
7 119
	public function __construct() {
8 119
		$this->CI =& get_instance(); //grab an instance of CI
9 119
		$this->initiate_cache();
10 119
	}
11
12 119
	public function initiate_cache() {
13 119
		$this->CI->load->driver('cache', array('adapter' => 'file', 'backup' => 'apc')); //Sadly we can't autoload this with params
14
		//FIXME: We would just use APC caching, but it's a bit more tricky to manage with multiple site setups..
15 119
	}
16
}
17