You are here

public static function GoogleAnalyticsCounterHelper::cacheTime in Google Analytics Counter 8.3

Sets the expiry timestamp for cached queries. Default is 1 day.

Return value

int The UNIX timestamp to expire the query at.

2 calls to GoogleAnalyticsCounterHelper::cacheTime()
GoogleAnalyticsCounterAppManager::reportData in src/GoogleAnalyticsCounterAppManager.php
Request report data.
GoogleAnalyticsCounterFeed::query in src/GoogleAnalyticsCounterFeed.php
Public query method for all Core Reporting API features.

File

src/GoogleAnalyticsCounterHelper.php, line 90

Class

GoogleAnalyticsCounterHelper
Provides Google Analytics Counter helper functions.

Namespace

Drupal\google_analytics_counter

Code

public static function cacheTime() {
  $config = \Drupal::config('google_analytics_counter.settings');
  return time() + $config
    ->get('general_settings.cache_length');
}