| @@ 158-172 (lines=15) @@ | ||
| 155 | * |
|
| 156 | * @return Nginx |
|
| 157 | */ |
|
| 158 | protected function getProxyClient($purgeLocation = '') |
|
| 159 | { |
|
| 160 | if (null === $this->proxyClient) { |
|
| 161 | $httpAdapter = new HttpAdapter( |
|
| 162 | ['http://127.0.0.1:'.$this->getCachingProxyPort()], |
|
| 163 | $this->getHostName().':'.$this->getCachingProxyPort() |
|
| 164 | ); |
|
| 165 | ||
| 166 | $this->proxyClient = new Nginx($httpAdapter, [ |
|
| 167 | 'purge_location' => $purgeLocation, |
|
| 168 | ]); |
|
| 169 | } |
|
| 170 | ||
| 171 | return $this->proxyClient; |
|
| 172 | } |
|
| 173 | } |
|
| 174 | ||
| @@ 112-127 (lines=16) @@ | ||
| 109 | * |
|
| 110 | * @return Symfony |
|
| 111 | */ |
|
| 112 | protected function getProxyClient() |
|
| 113 | { |
|
| 114 | if (null === $this->proxyClient) { |
|
| 115 | $httpAdapter = new HttpAdapter( |
|
| 116 | ['http://127.0.0.1:'.$this->getCachingProxyPort()], |
|
| 117 | $this->getHostName().':'.$this->getCachingProxyPort() |
|
| 118 | ); |
|
| 119 | ||
| 120 | $this->proxyClient = new Symfony($httpAdapter, [ |
|
| 121 | 'purge_method' => 'NOTIFY', |
|
| 122 | ] |
|
| 123 | ); |
|
| 124 | } |
|
| 125 | ||
| 126 | return $this->proxyClient; |
|
| 127 | } |
|
| 128 | } |
|
| 129 | ||
| @@ 175-186 (lines=12) @@ | ||
| 172 | * |
|
| 173 | * @return Varnish |
|
| 174 | */ |
|
| 175 | protected function getProxyClient() |
|
| 176 | { |
|
| 177 | if (null === $this->proxyClient) { |
|
| 178 | $httpAdapter = new HttpAdapter( |
|
| 179 | ['http://127.0.0.1:'.$this->getCachingProxyPort()], |
|
| 180 | $this->getHostName().':'.$this->getCachingProxyPort() |
|
| 181 | ); |
|
| 182 | $this->proxyClient = new Varnish($httpAdapter); |
|
| 183 | } |
|
| 184 | ||
| 185 | return $this->proxyClient; |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * Get the hostname where your application can be reached. |
|