php - Codeigniter caching the same method with other parameters -


i´m working on caching in codeigniter , find out 1 problem don´t know how solve: have method view_produdcts() products according url , render view. turned on cache there if want render product´s parameters first time, it´s ok, if try render products other parameters, still returns me products loaded first time.

do know, how solve it?

thank ideas.

here method:

/**  * view products parameters  */     public function view_products() {       $limit = 12; // limit of products per page     $attrs = parse_attributes_from_url($_get); // load attributes url      $config['per_page'] = $limit; // set config files paging     $config['base_url'] = prepare_url_from_attributes_for_paging(generate_url_from_attributes($attrs));     $config['cur_page'] = $attrs['page'];      $attrs['limit'] = $limit;      $data['products'] = $this->products_model->get_products_specified($attrs); products     $data['popular_categories'] = $this->categories_model->get_popular_categories();     $data['all_categories'] = $this->categories_model->get_categories_list_eshop();      if(isset($attrs['cat']) && $attrs['cat'] != null){     $data['category_title'] = $this->categories_model->get_category_title($attrs['cat']);     }     else {     $data['category_title'] = $this->categories_model->get_category_title(3);         }     main_view_front('products/category', $data); } 


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -