"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

HttpCache.php  (phplist-3.4.5.tgz):HttpCache.php  (phplist-3.4.6.tgz)
skipping to change at line 435 skipping to change at line 435
return $response; return $response;
} }
/** /**
* Forwards the Request to the backend and returns the Response. * Forwards the Request to the backend and returns the Response.
* *
* All backend requests (cache passes, fetches, cache validations) * All backend requests (cache passes, fetches, cache validations)
* run through this method. * run through this method.
* *
* @param Request $request A Request instance * @param bool $catch Whether to catch exceptions or not
* @param bool $catch Whether to catch exceptions or not * @param Response|null $entry A Response instance (the stale entry if prese
* @param Response $entry A Response instance (the stale entry if present, nt, null otherwise)
null otherwise)
* *
* @return Response A Response instance * @return Response A Response instance
*/ */
protected function forward(Request $request, $catch = false, Response $entry = null) protected function forward(Request $request, $catch = false, Response $entry = null)
{ {
if ($this->surrogate) { if ($this->surrogate) {
$this->surrogate->addSurrogateCapability($request); $this->surrogate->addSurrogateCapability($request);
} }
// always a "master" request (as the real master request can be in cache ) // always a "master" request (as the real master request can be in cache )
skipping to change at line 649 skipping to change at line 648
* @param string $event The event name * @param string $event The event name
*/ */
private function record(Request $request, $event) private function record(Request $request, $event)
{ {
$this->traces[$this->getTraceKey($request)][] = $event; $this->traces[$this->getTraceKey($request)][] = $event;
} }
/** /**
* Calculates the key we use in the "trace" array for a given request. * Calculates the key we use in the "trace" array for a given request.
* *
* @param Request $request
*
* @return string * @return string
*/ */
private function getTraceKey(Request $request) private function getTraceKey(Request $request)
{ {
$path = $request->getPathInfo(); $path = $request->getPathInfo();
if ($qs = $request->getQueryString()) { if ($qs = $request->getQueryString()) {
$path .= '?'.$qs; $path .= '?'.$qs;
} }
return $request->getMethod().' '.$path; return $request->getMethod().' '.$path;
} }
/** /**
* Checks whether the given (cached) response may be served as "stale" when a revalidation * Checks whether the given (cached) response may be served as "stale" when a revalidation
* is currently in progress. * is currently in progress.
* *
* @param Response $entry
*
* @return bool true when the stale response may be served, false otherwise * @return bool true when the stale response may be served, false otherwise
*/ */
private function mayServeStaleWhileRevalidate(Response $entry) private function mayServeStaleWhileRevalidate(Response $entry)
{ {
$timeout = $entry->headers->getCacheControlDirective('stale-while-revali date'); $timeout = $entry->headers->getCacheControlDirective('stale-while-revali date');
if (null === $timeout) { if (null === $timeout) {
$timeout = $this->options['stale_while_revalidate']; $timeout = $this->options['stale_while_revalidate'];
} }
 End of changes. 3 change blocks. 
8 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)