diff --git a/src/ConvertKit_API.php b/src/ConvertKit_API.php index e989a42..483c755 100644 --- a/src/ConvertKit_API.php +++ b/src/ConvertKit_API.php @@ -54,20 +54,6 @@ class ConvertKit_API */ protected $api_url_base = 'https://api.convertkit.com/'; - /** - * API resources - * - * @var array> - */ - protected $resources = []; - - /** - * Additional markup - * - * @var array - */ - protected $markup = []; - /** * Debug * @@ -524,11 +510,6 @@ public function get_resources(string $resource) throw new \InvalidArgumentException(); } - // Return cached resource if it exists. - if (array_key_exists($resource, $this->resources)) { - return $this->resources[$resource]; - } - // Assign the resource to the request variable. $request = $resource; @@ -632,10 +613,7 @@ public function get_resources(string $resource) throw new \InvalidArgumentException('An unsupported resource was specified.'); }//end switch - // Cache resources and return. - $this->resources[$resource] = $_resource; - - return $this->resources[$resource]; + return $_resource; } /** @@ -1117,12 +1095,6 @@ public function get_resource(string $url) $this->create_log(sprintf('Getting resource %s', $url)); - // If the resource was already fetched, return the cached version now. - if (isset($this->markup[$url])) { - $this->create_log('Resource already set'); - return $this->markup[$url]; - } - // Fetch the resource. $request = new Request( 'GET', @@ -1174,8 +1146,6 @@ public function get_resource(string $url) // LIBXML_HTML_NOIMPLIED to correctly work. $resource = $this->strip_html_head_body_tags($resource); - // Cache and return. - $this->markup[$url] = $resource; return $resource; }