Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Controller
- public function index(){
- Cache::delete('fiseIndex');
- $fise = Cache::read('fiseIndex');
- if (!$fise) {
- $fise = $this->Fisa->retrieve('all',[],
- ['User','Client','SalesStatus','BrandModel'=>['Brand']]
- );
- Cache::write($fise,'fiseIndex','verylong');
- }
- $this->set('fise',$fise);
- }
- //AppModel
- public function retrieve($type = 'list', $conditions = [], $contain = [], $order = []){
- if(!isset($conditions[$this->alias.'.deleted'])){
- $conditions[$this->alias.'.deleted'] = 0;
- }
- return $this->find($type,[
- 'conditions' =>$conditions,
- 'contain' =>$contain,
- 'order' =>$order
- ]);
- }
- //Error
- Array to string conversion [M:\XAMPP\htdocs\__CORE__\lib\Cake\Cache\Engine\FileEngine.php, line 402]
- //Code in CORE
- $key = Inflector::underscore(str_replace(array(DS, '/', '.', '<', '>', '?', ':', '|', '*', '"'), '_', strval($key)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement