Panada Framework 1.0.0 Documentation

Memcached

Untuk menggunakan driver ini, pastikan PHP Anda telah terinstall ekstensi Memcached.

Konfigurasi

Konfigurasi dilakukan di file app/config/cache.php

Bagian-bagian yang harus dilengkapi adalah host, dan port.

Inisialisasi

Inisialisasi driver Memcached bisa dilakukan di dalam constructor ataupun method yang bersangkutan.

$this->cache = new Resources\Cache();

Matrik Method

Secara natif, Memcached API datang dengan beberapa method. Untuk kemudahan akses, Panada menyediakan interface untuk mengkasesnya, berikut adalah matriknya:

PHP Memcached Native Method Panada Driver Memcached Methods Manual
Memcached::add $this->cache->add() http://www.php.net/manual/en/memcached.add.php
Memcached::addByKey $this->cache->addByKey() http://www.php.net/manual/en/memcached.addbykey.php
Memcached::addServer $this->cache->addServer() http://www.php.net/manual/en/memcached.addserver.php
Memcached::addServers $this->cache->addServers() http://www.php.net/manual/en/memcached.addservers.php
Memcached::append $this->cache->append() http://www.php.net/manual/en/memcached.append.php
Memcached::appendByKey $this->cache->appendByKey() http://www.php.net/manual/en/function.apc-cache-info.php
Memcached::cas $this->cache->cas() http://www.php.net/manual/en/memcached.cas.php
Memcached::casByKey $this->cache->casByKey() http://www.php.net/manual/en/memcached.casbykey.php
Memcached::decrement $this->cache->decrement() http://www.php.net/manual/en/memcached.decrement.php
Memcached::delete $this->cache->delete() http://www.php.net/manual/en/memcached.delete.php
Memcached::deleteByKey $this->cache->deleteByKey() http://www.php.net/manual/en/memcached.deletebykey.php
Memcached::fetch $this->cache->fetch() http://www.php.net/manual/en/memcached.fetch.php
Memcached::fetchAll $this->cache->fetchAll() http://www.php.net/manual/en/memcached.fetchall.php
Memcached::flush $this->cache->flush() http://www.php.net/manual/en/memcached.flush.php
Memcached::get $this->cache->get() http://www.php.net/manual/en/memcached.get.php
Memcached::getByKey $this->cache->getByKey() http://www.php.net/manual/en/memcached.getbykey.php
Memcached::getDelayed $this->cache->getDelayed() http://www.php.net/manual/en/memcached.getdelayed.php
Memcached::getDelayedByKey $this->cache->getDelayedByKey() http://www.php.net/manual/en/memcached.getdelayedbykey.php
Memcached::getMulti $this->cache->getMulti() http://www.php.net/manual/en/memcached.getmulti.php
Memcached::getMultiByKey $this->cache->getMultiByKey() http://www.php.net/manual/en/memcached.getmultibykey.php
Memcached::getOption $this->cache->getOption() http://www.php.net/manual/en/memcached.getoption.php
Memcached::getResultCode $this->cache->getResultCode() http://www.php.net/manual/en/memcached.getresultcode.php
Memcached::getResultMessage $this->cache->getResultMessage() http://www.php.net/manual/en/memcached.getresultmessage.php
Memcached::getServerByKey $this->cache->getServerByKey() http://www.php.net/manual/en/memcached.getserverbykey.php
Memcached::getServerList $this->cache->getServerList() http://www.php.net/manual/en/memcached.getserverlist.php
Memcached::getStats $this->cache->getStats() http://www.php.net/manual/en/memcached.getstats.php
Memcached::getVersion $this->cache->getVersion() http://www.php.net/manual/en/memcached.getversion.php
Memcached::increment $this->cache->increment() http://www.php.net/manual/en/memcached.increment.php
Memcached::prepend $this->cache->prepend() http://www.php.net/manual/en/memcached.prepend.php
Memcached::prependByKey $this->cache->prependByKey() http://www.php.net/manual/en/memcached.prependbykey.php
Memcached::replace $this->cache->replace() http://www.php.net/manual/en/memcached.replace.php
Memcached::replaceByKey $this->cache->replaceByKey() http://www.php.net/manual/en/memcached.replacebykey.php
Memcached::set $this->cache->set() http://www.php.net/manual/en/memcached.set.php
Memcached::setByKey $this->cache->setByKey() http://www.php.net/manual/en/memcached.setbykey.php
Memcached::setMulti $this->cache->setMulti() http://www.php.net/manual/en/memcached.setmulti.php
Memcached::setMultiByKey $this->cache->setMultiByKey() http://www.php.net/manual/en/memcached.setmultibykey.php
Memcached::setOption $this->cache->setOption() http://www.php.net/manual/en/memcached.setoption.php

Diskusi