Пример #1
0
 /**
  * CreateResponse
  *
  * @return JsonResponse
  */
 public function createResponse()
 {
     $response = new JsonResponse();
     $response->expire();
     $response->setLastModified(new \DateTime());
     $response->headers->set('Cache-Control', 'no-store, no-cache, must-revalidate', true);
     $response->headers->set('Cache-Control', 'post-check=0, pre-check=0', false);
     $response->headers->set('Pragma', 'no-cache');
     return $response;
 }