You are here

public function AkamaiClientBase::bodyIsBelowLimit in Akamai 8.3

Verifies that the body of a purge request will be under 50,000 bytes.

Parameters

array $paths: An array of paths to be purged.

Return value

bool TRUE if the body size is below the limit, otherwise FALSE.

Overrides AkamaiClientInterface::bodyIsBelowLimit

File

src/AkamaiClientBase.php, line 472

Class

AkamaiClientBase
Connects to the Akamai EdgeGrid.

Namespace

Drupal\akamai

Code

public function bodyIsBelowLimit(array $paths = []) {
  $body = $this
    ->createPurgeBody($paths);
  $bytes = mb_strlen($body, '8bit');
  return $bytes < self::MAX_BODY_SIZE;
}