Neos\Flow\Http\Response::setPrivate PHP Метод

setPrivate() публичный Метод

A response flagged as "private" tells that it is intended for a specific user and must not be cached by a shared cache.
public setPrivate ( ) : Response
Результат Response This response, for method chaining
    public function setPrivate()
    {
        $this->headers->setCacheControlDirective('private');
        return $this;
    }

Usage Example

 /**
  * RFC 2616 / 14.9.1
  *
  * @test
  */
 public function setPrivateSetsTheRespectiveCacheControlDirective()
 {
     $response = new Response();
     $response->setNow(new \DateTime());
     $response->setPrivate();
     $this->assertEquals('private', $response->getHeader('Cache-Control'));
 }