CodeIgniter v4.5 API

ResponseCache
in package

FinalYes

Web Page Caching

Tags
see
ResponseCacheTest

Table of Contents

Properties

$cache  : CacheInterface
$cacheQueryString  : bool|array<int, string>
Whether to take the URL query string into consideration when generating output cache files. Valid options are:
$ttl  : int
Cache time to live.

Methods

__construct()  : mixed
get()  : ResponseInterface|null
Gets the cached response for the request.
make()  : bool
Caches the response.
setTtl()  : $this

Properties

$cacheQueryString

Whether to take the URL query string into consideration when generating output cache files. Valid options are:

private bool|array<int, string> $cacheQueryString = false

false = Disabled true = Enabled, take all query parameters into account. Please be aware that this may result in numerous cache files generated for the same page over and over again. array('q') = Enabled, but only take into account the specified list of query parameters.

Methods

setTtl()

public setTtl(int $ttl) : $this
Parameters
$ttl : int
Return values
$this

        
On this page

Search results