-
-
Notifications
You must be signed in to change notification settings - Fork 113
json response: removed automatic cache disabling #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👍 Disabling caching doesn't make sense. |
|
Is there a way to override this? Or you just couldn't use the response object if you wanned it to be cached? Maybe an option would be better than removing it completely. |
|
👍 Makes sence. |
|
Can you change |
|
Repushed with BC break info. |
|
Maybe we should add |
|
Why? You can configure it directly through Http\Response object. |
|
I don't see the added valude, only the added complexity of another parameter. Feel free to change the expiration in the Response instance. |
|
Well to achieve the original behavior I'll have to replace all of my occurences of sendJson with $response = new JsonResponse($data);
$response->setExpiration(false);
$this->sendResponse($response);The parameter would simplify it pretty well. |
|
Or you can just use: $this->getHttpResponse()->setExpiration(FALSE);
$this->sendJson(...); |
18f376d to
3fe619f
Compare
json response: removed automatic cache disabling
|
Thanks! |
The json output isn't something special what shouldn't be cached at all. If disabling of cache is needed, this should be handled by Nette Presenter itself.
It's probably BC Break.