PHP Trait WhichBrowser\Cache

Afficher le fichier Open project: whichbrowser/parser

Méthodes publiques

Свойство Type Description
$cached boolean Was this result retrieve from the cache?

Méthodes publiques

Méthode Description
setCache ( object $cache, integer $expires = 900 ) Enable caching of results

Private Methods

Méthode Description
analyseWithCache ( array | string $headers, $options = [] ) : boolean Retrieve the result from the cache, or analyse and store in the cache
applyCachedData ( array $data ) Apply cached data to the main Parser object
retrieveCachedData ( ) : array Retrieve the data that can be cached from the main Parser object

Method Details

setCache() public méthode

Enable caching of results
public setCache ( object $cache, integer $expires = 900 )
$cache object An PSR-6 cache pool (an object that implements Psr\Cache\CacheItemPoolInterface)
$expires integer Optional the number of seconds after which a cached item expires, default is 15 minutes

Property Details

$cached public_oe property

Was this result retrieve from the cache?
public bool $cached
Résultat boolean