__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Kevinrob\GuzzleCache\Strategy;
use Kevinrob\GuzzleCache\KeyValueHttpHeader;
use Kevinrob\GuzzleCache\Storage\CacheStorageInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* This strategy represents a "public" or "shared" HTTP client.
* You can share the storage between applications.
*
* For example, a response with cache-control header "private, max-age=60"
* will be NOT cached by this strategy.
*
* The rules applied are from RFC 7234.
*
* @see https://tools.ietf.org/html/rfc7234
*/
class PublicCacheStrategy extends PrivateCacheStrategy
{
public function __construct(CacheStorageInterface $cache = null)
{
parent::__construct($cache);
array_unshift($this->ageKey, 's-maxage');
}
/**
* {@inheritdoc}
*/
protected function getCacheObject(RequestInterface $request, ResponseInterface $response)
{
$cacheControl = new KeyValueHttpHeader($response->getHeader('Cache-Control'));
if ($cacheControl->has('private')) {
return;
}
return parent::getCacheObject($request, $response);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Delegate | Folder | 0777 |
|
|
| CacheStrategyInterface.php | File | 997 B | 0777 |
|
| GreedyCacheStrategy.php | File | 3.52 KB | 0777 |
|
| NullCacheStrategy.php | File | 778 B | 0777 |
|
| PrivateCacheStrategy.php | File | 7.35 KB | 0777 |
|
| PublicCacheStrategy.php | File | 1.13 KB | 0777 |
|