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

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -