We have a fairly simple proxy set up which I’m trying to add caching to. I’ve created a ResponseCache policy and added it to the default proxy endpoint as the last step in the Pre and Post flows
<ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache">
<DisplayName>Response Cache</DisplayName>
<CacheKey>
<KeyFragment ref="agreementId" type="string"/>
</CacheKey>
<ExpirySettings>
<TimeoutInSec>600</TimeoutInSec>
</ExpirySettings>
<UseResponseCacheHeaders>true</UseResponseCacheHeaders>
<ExcludeErrorResponse>true</ExcludeErrorResponse>
</ResponseCache>
When executed, the PreFlow works fine, but in the PostFlow, I’m seeing this error:
{
"Envelope": {
"encodingStyle": "http://schemas.xmlsoap.org/soap/encoding/",
"Body": {
"Fault": {
"faultcode": "soap:Server",
"faultstring": "java.lang.String cannot be cast to com.apigee.entities.info.EnvironmentInfo",
"faultactor": {},
"detail": {
"source": {
"errorcode": "Internal Server Error"
}
}
}
}
}
}
This fault isn’t coming from our backend system - I can see the correct, expected response in the step right before ResponseCache (and setting continueOnError to true allows the backend’s response through), but I can’t find any additional info on why this error is happening.