You are here

interface CloudFlareStateInterface in CloudFlare 8

Tracks rate limits associated with CloudFlare Api.

Hierarchy

Expanded class hierarchy of CloudFlareStateInterface

All classes that implement CloudFlareStateInterface

5 files declare their use of CloudFlareStateInterface
ApiRateLimitCheck.php in modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ApiRateLimitCheck.php
CloudFlarePurger.php in modules/cloudflarepurger/src/Plugin/Purge/Purger/CloudFlarePurger.php
DailyTagPurgeLimitCheck.php in modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/DailyTagPurgeLimitCheck.php
SettingsForm.php in src/Form/SettingsForm.php
ZoneMock.php in tests/modules/cloudflare_form_tester/src/Mocks/ZoneMock.php

File

src/CloudFlareStateInterface.php, line 8

Namespace

Drupal\cloudflare
View source
interface CloudFlareStateInterface {

  /**
   * Get the count of purges done in the past 5 minutes.
   *
   * @return int
   *   Count of purges done in the past 5 minutes
   */
  public function getApiRateCount();

  /**
   * Get the count of tag purges done today.
   *
   * @return int
   *   Count of tag purges done today.
   */
  public function getTagDailyCount();

  /**
   * Increment the count of api calls done in the past 5 minutes.
   *
   * @see https://api.cloudflare.com/#requests
   */
  public function incrementApiRateCount();

  /**
   * Increment the count of tag purges done today.
   *
   * @see https://support.cloudflare.com/hc/en-us/articles/206596608-How-to-Purge-Cache-Using-Cache-Tags
   */
  public function incrementTagPurgeDailyCount();

}

Members

Namesort descending Modifiers Type Description Overrides
CloudFlareStateInterface::getApiRateCount public function Get the count of purges done in the past 5 minutes. 1
CloudFlareStateInterface::getTagDailyCount public function Get the count of tag purges done today. 1
CloudFlareStateInterface::incrementApiRateCount public function Increment the count of api calls done in the past 5 minutes. 1
CloudFlareStateInterface::incrementTagPurgeDailyCount public function Increment the count of tag purges done today. 1