Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Cache json responses only? #1

Open
rjsworking opened this issue Apr 21, 2016 · 0 comments
Open

Cache json responses only? #1

rjsworking opened this issue Apr 21, 2016 · 0 comments

Comments

@rjsworking
Copy link

Hi

It's working ok for json responses but the app throws an exception when trying to cache a response from a view:

return response()
    ->view('index', ['data' => $data])
    ->setPublic()
    ->setMaxAge(300);

The error is Serialization of 'Closure' is not allowed in vendor\laravel\framework\src\Illuminate\Cache\FileStore.php

Is there a way to improve your package so it can cache all kind of responses?

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant