original_string: public function cached($public = true, $expires = '+1 year')
      {
          if (!is_int($expires)) {
              $expires = strtotime($expires);
          }
          $maxAge = $expires - time();
          $pragma = $public ? 'public' : 'private';
          $cache = $pragma . ', max-age=' . $maxAge;
          $response = clone $this;
          $response->setHeader('Expires', Message::date($expires));
          $response->setHeader('Pragma', $pragma);
          $response->setHeader('Cache-Control', $cache);
          return $response;
      }
code: public function cached($public = true, $expires = '+1 year')
      {
          if (!is_int($expires)) {
              $expires = strtotime($expires);
          }
          $maxAge = $expires - time();
          $pragma = $public ? 'public' : 'private';
          $cache = $pragma . ', max-age=' . $maxAge;
          $response = clone $this;
          $response->setHeader('Expires', Message::date($expires));
          $response->setHeader('Pragma', $pragma);
          $response->setHeader('Cache-Control', $cache);
          return $response;
      }
code_tokens: public function cached ( $ public = true , $ expires = '+1 year' ) { if ( ! is_int ( $ expires ) ) { $ expires = strtotime ( $ expires ) ; } $ maxAge = $ expires - time ( ) ; $ pragma = $ public ? 'public' : 'private' ; $ cache = $ pragma . ', max-age=' . $ maxAge ; $ response = clone $ this ; $ response -> setHeader ( 'Expires' , Message :: date ( $ expires ) ) ; $ response -> setHeader ( 'Pragma' , $ pragma ) ; $ response -> setHeader ( 'Cache-Control' , $ cache ) ; return $ response ; }
docstring: Set cache settings.
  @param string $public Public or private.
  @param int|string $expires Time on which cache expires. Can be a UNIX
  timestamp or a string used with {@see strtotime()}.
docstring_tokens: Set cache settings .