skip to Main Content

Memcached – Create a Cache Provider class in Symfony

We have memcache on our Symfony 3.4 app: cache: app: cache.adapter.memcached default_memcached_provider: "%app.memcached.dsn%" However, we've been asked to use several cache servers, so just passing one DSN is no good. Looking here (https://symfony.com/blog/new-in-symfony-3-3-memcached-cache-adapter), I see you can create it in…

VIEW QUESTION

Memcached – Can't caching object in codeigniter

I have this following code in the Address controller public function index() { if($this->session->userdata('isLogin')) { $this->load->driver('cache'); $this->load->model('MemberModel'); if(!$this->cache->get('province') == false) { $this->load->model('ShippingModel'); $data['provinces'] = $this->ShippingModel->the_provinces(); // it will return json object $this->cache->save('province', $data['provinces'], 300); } else { $data['provinces'] = $this->cache->get('province');…

VIEW QUESTION
Back To Top
Search