mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
IMPR: Cache control
This commit is contained in:
parent
7995d46cb6
commit
c78ef9f435
@ -29,7 +29,7 @@ class PageController extends ContentController
|
||||
protected function init()
|
||||
{
|
||||
HTTPCacheControlMiddleware::singleton()
|
||||
->enableCache()
|
||||
->enableCache(true)
|
||||
// 1 minute
|
||||
->setMaxAge(60);
|
||||
|
||||
@ -76,7 +76,7 @@ class PageController extends ContentController
|
||||
// inject AJAX processing
|
||||
if (Director::is_ajax()) {
|
||||
HTTPCacheControlMiddleware::singleton()
|
||||
->disableCache();
|
||||
->disableCache(true);
|
||||
|
||||
return AjaxControllerEx::processAJAX($tpls);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user