Spatie\Analytics\AnalyticsClient::setCacheLifeTimeInMinutes PHP 메소드

setCacheLifeTimeInMinutes() 공개 메소드

Set the cache time.
public setCacheLifeTimeInMinutes ( integer $cacheLifeTimeInMinutes ) : self
$cacheLifeTimeInMinutes integer
리턴 self
    public function setCacheLifeTimeInMinutes(int $cacheLifeTimeInMinutes)
    {
        $this->cacheLifeTimeInMinutes = $cacheLifeTimeInMinutes;
        return $this;
    }

Usage Example

 protected static function createAnalyticsClient(array $analyticsConfig, Google_Service_Analytics $googleService) : AnalyticsClient
 {
     $client = new AnalyticsClient($googleService, app(Repository::class));
     $client->setCacheLifeTimeInMinutes($analyticsConfig['cache_lifetime_in_minutes']);
     return $client;
 }