在Laravel 4中使用缓存部分

时间:2013-06-02 03:08:53

标签: laravel laravel-4

我正在尝试使用缓存部分并收到错误

   Warning: call_user_func_array() expects parameter 1 to be a valid callback, class
 'Illuminate\Cache\MemcachedStore' does not have a method 'section' in   
/vendor/laravel/framework/src/Illuminate/Cache/Repository.php line 196

来自我的代码:

use Illuminate\Support\Facades\Cache;
use \Illuminate\Support\Facades\Response;
use \Illuminate\Support\Facades\Request;
use \Illuminate\Support\Facades\Input;

class SimpleSearchController extends BaseController{
    public function __construct() {
        parent::__construct();

        Cache::forever('test', 'this is a saved test cached vaclue');

        $john = ['ming','chin','zao'];
        Cache::section('people_d')->forever('John', $john);

        }

任何见解都将受到赞赏

0 个答案:

没有答案