Merge pull request #8360 from open-sausages/pulls/4/fix-http-caching

Make sure that CMS requests disable caching
This commit is contained in:
Robbie Averill 2018-09-06 12:51:23 +02:00 committed by GitHub
commit c5554ca287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Convert;
@ -494,6 +495,7 @@ class Security extends Controller implements TemplateGlobalProvider
*/
public function ping()
{
HTTPCacheControlMiddleware::singleton()->disableCache();
Requirements::clear();
return 1;
}