Cached results throw a PHP fatal error if a custom HTTP reponse code is set.
Steps to reproduce :
Create a REST application (...) and write create a controller that extends ezpRestMvcController, that contains :
The doGetTest() method defines an HTTP code.
Enable caching in rest.ini and run the API once. Right, it outputs the custom message and the result gets cached.
But when you run it again, the cached PHP file throws the following error :
Fatal error: Call to undefined method ezpRestHttpResponse::__set_state()
I just implemented and tested the missing method of ezpRestHttpResponse :
Add it in the mentionned file and the bug will be fixed.
PS : i'm not sure about the version. I use eZ Publish Community 2012.8.