Cache
class Cache (View source)
Properties
static array | $drivers | Berisi seluruh cache driver yang aktif. |
|
static array | $registrar | Berisi registrar cache driver pihak ketiga. |
Methods
static
__callStatic($method, array $parameters)
Magic Method untuk memanggil method milik cache driver default.
Details
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');
static protected Driver
factory(string $driver)
Buat instance cache driver baru.
static
extend(string $driver, Closure $resolver)
Daftarkan cache driver pihak ketiga.
static
__callStatic($method, array $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);