php - Guzzle CacheSubscriber first response is empty -
when execute normal guzzle request cachesubscriber attached, gets executed, data gets stored in cache (storage doesn't matter, tried array , redis), request body empty. both guzzle , cachesubscriber seem work properly. first request has empty body.
next request shows results cache.
guzzle version - 5.2.0
guzzle cachesubscriber - dev-master
is there i'm missing? have cachesubscriber running?
still not sure what's cause, maybe understand intention of getcontents wrong, using
$content = (string)$response->getbody(); // works
instead of
$content = $response->getbody()->getcontents(); // won't work
solved problem me.
Comments
Post a Comment