在分页的雄辩模型上缓存密钥

I am trying to cache eloquent result on laravel 4 using,

Model::with('something')->remember(time, key)->pagination(total);

but it gives me the following error,

ErrorException. Trying to get property of non-object

When I remove the key,

Model::with('something')->remember(time)->pagination(total);

it works fine.

Any idea why?

Model::with('something')->remember(time, key)->pagination(total);

Caching did not work because remember() expecting only one parameter and parameter must be a number (time in minutes). In addition, You don't need to pass any key to cache the result.

Model::with('something')->remember(10)->pagination(total);

In this example, the results of the query will be cached for ten minutes. While the results are cached, the query will not be run against the database, and the results will be loaded from the default cache driver specified for your application.