Closed drfraker closed 11 months ago
This hack seems to resolve the issue in my case. I'm basically manually adding in the query params to the cache key. Now I get a cached version of each page.
protected function cacheKey(PendingRequest $pendingRequest): ?string
{
$query = $pendingRequest->getUri()->getQuery();
return 'tenant_'.tenant()->id.'_mindbody_programs_'.$query;
}
I resolved this issue. I see now that the cache trait calls the CacheKeyHelper and makes a key out of the full request including className, URL, query params and headers. No need to manually define a cache key.
Glad you managed to solve the issue! Thank you for the kind words ❤️
Hey @Sammyjo20, thanks for the amazing package.
I'm running into an issue where I have a paginated connector and a request that is being cached. When I make the call to get paginated results each loop is returning the cached value from the first request and not getting the following pages. Is there something I'm doing wrong here, or is this a bug? It appears to be caching using a key based on the url but not the query parameters and when the params have ?limit=x&offset=y they are not included to cache the paged results.
Here are the connector and the Request: