Some cache fixes
This commit is contained in:
@@ -193,6 +193,9 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
}
|
||||
|
||||
parent::after();
|
||||
|
||||
// Generate and check the ETag for this file
|
||||
$this->response->check_cache(NULL,$this->request);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,9 +243,6 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
* @return void
|
||||
*/
|
||||
final public function action_media() {
|
||||
// Generate and check the ETag for this file
|
||||
$this->response->check_cache(NULL,$this->request);
|
||||
|
||||
// Get the file path from the request
|
||||
$file = $this->request->param('file');
|
||||
|
||||
@@ -272,6 +272,9 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
$this->response->status(404);
|
||||
}
|
||||
|
||||
// Generate and check the ETag for this file
|
||||
$this->response->check_cache(NULL,$this->request);
|
||||
|
||||
// Set the proper headers to allow caching
|
||||
$this->response->headers('Content-Type',File::mime_by_ext($ext));
|
||||
$this->response->headers('Content-Length',(string)$this->response->content_length());
|
||||
|
Reference in New Issue
Block a user