@@ -95,7 +95,7 @@ public function getMenu(string $slug): ?Menu
95
95
public function getCategories (string $ slug = '' ): array
96
96
{
97
97
return $ this ->cache ->get ($ this ->getCacheKey ('categories ' , $ slug ), function (/*ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
98
- $ data = $ this ->client ->get ('/wp/v2/categories ' .$ slug );
98
+ $ data = $ this ->client ->getUri ('/wp/v2/categories ' .$ slug );
99
99
if (!$ this ->isValidResponse ($ data )) {
100
100
$ item ->expiresAfter (300 );
101
101
@@ -111,7 +111,7 @@ public function getCategories(string $slug = ''): array
111
111
public function getMedia (string $ slug = '' ): array
112
112
{
113
113
return $ this ->cache ->get ($ this ->getCacheKey ('media ' , $ slug ), function (/*ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
114
- $ data = $ this ->client ->get ('/wp/v2/media ' .$ slug );
114
+ $ data = $ this ->client ->getUri ('/wp/v2/media ' .$ slug );
115
115
if (!$ this ->isValidResponse ($ data )) {
116
116
$ item ->expiresAfter (300 );
117
117
@@ -137,6 +137,8 @@ public function purgeCache(string $identifier): void
137
137
// Get item and force recompute.
138
138
$ this ->cache ->get ($ this ->getCacheKey ('page ' , $ identifier ), $ callback , INF );
139
139
$ this ->cache ->get ($ this ->getCacheKey ('menu ' , $ identifier ), $ callback , INF );
140
+ $ this ->cache ->get ($ this ->getCacheKey ('categories ' , $ identifier ), $ callback , INF );
141
+ $ this ->cache ->get ($ this ->getCacheKey ('media ' , $ identifier ), $ callback , INF );
140
142
$ this ->cache ->get ($ this ->getCacheKey ('query ' , $ identifier ), $ callback , INF );
141
143
}
142
144
0 commit comments