mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Cache control
This commit is contained in:
parent
c74c1afad1
commit
7ad1420feb
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace A2nt\CMSNiceties\Ajax;
|
namespace A2nt\CMSNiceties\Ajax;
|
||||||
|
|
||||||
|
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
|
||||||
use A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx;
|
use A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx;
|
||||||
use SilverStripe\Forms\FormRequestHandler;
|
use SilverStripe\Forms\FormRequestHandler;
|
||||||
use SilverStripe\ORM\ValidationResult;
|
use SilverStripe\ORM\ValidationResult;
|
||||||
@ -26,6 +27,9 @@ class AjaxFormRequestHandler extends FormRequestHandler
|
|||||||
{
|
{
|
||||||
$resp = parent::httpSubmission($request);
|
$resp = parent::httpSubmission($request);
|
||||||
|
|
||||||
|
HTTPCacheControlMiddleware::singleton()
|
||||||
|
->disableCache();
|
||||||
|
|
||||||
if (!AjaxControllerEx::isFormRequest()) {
|
if (!AjaxControllerEx::isFormRequest()) {
|
||||||
return $resp;
|
return $resp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user