• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
view cache option doesn't work

#1
I have this controller and need to cache view using options method:

PHP Code:
    public function index()
    {
        
helper('text');
        
$settings service('settings');
        
        
$data = array(
            
'title' => $settings->siteMetaTitle,
            
'meta_description' => $settings->siteMetaDescription,
            
'meta_keywords' => $settings->siteMetaKeywords,
        );

        return 
view('index'$data, ['cache'120]);
    } 

But in action I check cache folder but I cant see any cache file. how do can I cache view?

Note: I know, I can work with $this->cachePage($n); method, But in action I need to work with view options method.
Reply

#2
try
PHP Code:
return view('index'$data, ['cache' => 120]); 
Reply

#3
(02-24-2021, 10:29 AM)paulbalandan Wrote: try
PHP Code:
return view('index'$data, ['cache' => 120]); 


It's also doesn't work!! You check it?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.