You are here

function google_analytics_reports_api_cache_time in Google Analytics Reports 8.3

Same name and namespace in other branches
  1. 7.3 google_analytics_reports_api/google_analytics_reports_api.module \google_analytics_reports_api_cache_time()

Sets the expiry timestamp for cached queries.

Default is 3 days.

Return value

int The UNIX timestamp to expire the query at.

1 call to google_analytics_reports_api_cache_time()
GoogleAnalyticsReportsApiFeed::query in google_analytics_reports_api/src/GoogleAnalyticsReportsApiFeed.php
Public query method for all Core Reporting API features.

File

google_analytics_reports_api/google_analytics_reports_api.module, line 161
Implements the API through which Google Analytics data can be accessed.

Code

function google_analytics_reports_api_cache_time() {
  return time() + \Drupal::config('google_analytics_reports_api.settings')
    ->get('cache_length');
}