1
votes

I am facing an issue while configuring Response cache.

I have configured response cache at my local system by using the following link https://docs.wso2.com/display/AM200/Configuring+Caching. But when i hit an API request from rest client it is still sending request to the backend server (legacy app). I am using WSO2 API Manager 2.x

Thanks Raju K

2
Enable wire logs and send the same request twice. Then post wire logs here. lakshanigamage.blogspot.com/2015/03/…Bee

2 Answers

0
votes

It should work. Make sure you enabled Response Caching in publisher UI for that particular API. To confirm it's done correctly, have a look at API synapse file in repository/deployment/server/synapse-configs/default/api/. It should have cache mediator like this.

     <cache scope="per-host"
            collector="false"
            hashGenerator="org.wso2.caching.digest.REQUESTHASHGenerator"
            timeout="300">
        <implementation type="memory" maxSize="500"/>
     </cache>
0
votes

I have changed the code in api_home\repository\resources\api_templates\velocity_template.xml

now it's working fine.