ProCache Tests
Methods for testing ProCache.
$tests = $procache->tests;
$result = $tests->urlCacheTest('https://processwire.com');
echo "<pre>" . htmlspecialchars(print_r($result, true)) . "</pre>";
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Pro
class also inherits all the methods and properties of: Pro
Common
Name | Return | Summary | |
---|---|---|---|
$tests->urlCacheTest() $tests->urlCacheTest(string $url) $tests->urlCacheTest(string $url, int $testNum = 1) | array | Test URL for non-cached vs. cached performance | |
$tests->urlCacheTestQty() $tests->urlCacheTestQty(string $url, int $qty) $tests->urlCacheTestQty(string $url, int $qty) | array | Run tests for given quantity of times, compiling the average | |
$tests->urlHeader() $tests->urlHeader(string $url, string $header) $tests->urlHeader(string $url, string $header, bool $requireCURL = false) | string bool | Get value for specific HTTP header | |
$tests->urlHeaders() $tests->urlHeaders(string $url) $tests->urlHeaders(string $url, bool $requireCURL = false) | array | Return all response headers for given URL | |
$tests->urlTest() $tests->urlTest(string $url) $tests->urlTest(string $url, bool $head = false) | array | Test given URL and return verbose array | |
$tests->validateUrl() $tests->validateUrl(string $url) $tests->validateUrl(string $url, array $options = []) | string | Validate a testing URL |
Additional methods and properties
In addition to the methods and properties above, Pro
API reference based on ProcessWire core version 3.0.252