From a custom plugin controller, I am returning data as json using
$this->returnJson($data). I need to be able to set the Cache-Control headers for my forward cache proxy to handle caching correctly.
Does anyone have any ideas for working around this or configuring
returnJson? I can do the following in my controller (or create a helper of my own):
HeaderHelper::setExpires(300); HeaderHelper::setContentTypeByExtension('json'); ob_start(); echo JsonHelper::encode($return); craft()->end();
but I'd rather use the super convenient