Skip to content

Commit b09f535

Browse files
committed
Removes $resources and $markup class properties
1 parent 8daf63e commit b09f535

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/ConvertKit_API.php

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ class ConvertKit_API
5454
*/
5555
protected $api_url_base = 'https://api.convertkit.com/';
5656

57-
/**
58-
* API resources
59-
*
60-
* @var array<int|string, array<int|string, mixed|\stdClass>>
61-
*/
62-
protected $resources = [];
63-
64-
/**
65-
* Additional markup
66-
*
67-
* @var array<string, string>
68-
*/
69-
protected $markup = [];
70-
7157
/**
7258
* Debug
7359
*
@@ -524,11 +510,6 @@ public function get_resources(string $resource)
524510
throw new \InvalidArgumentException();
525511
}
526512

527-
// Return cached resource if it exists.
528-
if (array_key_exists($resource, $this->resources)) {
529-
return $this->resources[$resource];
530-
}
531-
532513
// Assign the resource to the request variable.
533514
$request = $resource;
534515

@@ -632,10 +613,7 @@ public function get_resources(string $resource)
632613
throw new \InvalidArgumentException('An unsupported resource was specified.');
633614
}//end switch
634615

635-
// Cache resources and return.
636-
$this->resources[$resource] = $_resource;
637-
638-
return $this->resources[$resource];
616+
return $_resource;
639617
}
640618

641619
/**
@@ -1117,12 +1095,6 @@ public function get_resource(string $url)
11171095

11181096
$this->create_log(sprintf('Getting resource %s', $url));
11191097

1120-
// If the resource was already fetched, return the cached version now.
1121-
if (isset($this->markup[$url])) {
1122-
$this->create_log('Resource already set');
1123-
return $this->markup[$url];
1124-
}
1125-
11261098
// Fetch the resource.
11271099
$request = new Request(
11281100
'GET',
@@ -1174,8 +1146,6 @@ public function get_resource(string $url)
11741146
// LIBXML_HTML_NOIMPLIED to correctly work.
11751147
$resource = $this->strip_html_head_body_tags($resource);
11761148

1177-
// Cache and return.
1178-
$this->markup[$url] = $resource;
11791149
return $resource;
11801150
}
11811151

0 commit comments

Comments
 (0)