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

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -