You are here

protected function Api::setCache in SendGrid Integration 8

Same name and namespace in other branches
  1. 8.2 modules/sendgrid_integration_reports/src/Api.php \Drupal\sendgrid_integration_reports\Api::setCache()

Sets the cache to sendgrid_integration_reports bin.

Parameters

string $cid: Cache Id.

array $data: The data should be cached.

5 calls to Api::setCache()
Api::getBouncesBySubuser in modules/sendgrid_integration_reports/src/Api.php
Get bounces by subuser.
Api::getStats in modules/sendgrid_integration_reports/src/Api.php
Returns stats.
Api::getStatsBrowser in modules/sendgrid_integration_reports/src/Api.php
Returns browser stats.
Api::getStatsDevices in modules/sendgrid_integration_reports/src/Api.php
Returns devices stats.
Api::getSubusers in modules/sendgrid_integration_reports/src/Api.php
Get list of subusers.

File

modules/sendgrid_integration_reports/src/Api.php, line 122

Class

Api
Class SendGridReportsController.

Namespace

Drupal\sendgrid_integration_reports

Code

protected function setCache($cid, array $data) {
  if (!empty($data)) {
    $this->cacheFactory
      ->get($this->bin)
      ->set($cid, $data);
  }
}