class Cache

Properties

static array $drivers Berisi seluruh cache driver yang aktif.
static array $registrar Berisi registrar cache driver pihak ketiga.

Methods

static Driver
driver(string $driver = null)

Ambil instance cache driver.

static Driver
factory(string $driver)

Buat instance cache driver baru.

static 
extend(string $driver, Closure $resolver)

Daftarkan cache driver pihak ketiga.

static 
__callStatic($method, $parameters)

Magic Method untuk memanggil method milik cache driver default.

Details

at line 41
static Driver driver(string $driver = null)

Ambil instance cache driver.

Atau return driver default jika tidak ada driver yang dipilih.

 // Ambil instance driver default
 $driver = Cache::driver();

 // Ambil instance driver tertentu
 $driver = Cache::driver('memcached');

Parameters

string $driver

Return Value

Driver

at line 60
static protected Driver factory(string $driver)

Buat instance cache driver baru.

Parameters

string $driver

Return Value

Driver

at line 87
static extend(string $driver, Closure $resolver)

Daftarkan cache driver pihak ketiga.

Parameters

string $driver
Closure $resolver

at line 105
static __callStatic($method, $parameters)

Magic Method untuk memanggil method milik cache driver default.

 // Panggil method get() milik cache driver default.
 $name = Cache::get('name');

 // Panggil method put() milik cache driver default.
 Cache::put('name', 'Budi', 15);

Parameters

$method
$parameters