Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Whatever
- {
- public function invalidate()
- {
- if (\count($this->objects_to_invalidate) < 1)
- {
- return [];
- }
- try
- {
- $endpoint = '/zones/pull.json/417146/cache';
- $this->maxcdn_client->delete($endpoint, ['files' => $this->objects_to_invalidate]);
- return $this->objects_to_invalidate;
- }
- catch (RWSException $exception)
- {
- $error_message = '[MaxCDN] ' . $exception->getMessage();
- throw new CdnException($error_message, $exception->getCode());
- }
- }
- }
Add Comment
Please, Sign In to add comment