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
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>
I have changed the code in api_home\\repository\\resources\\api_templates\\velocity_template.xml
now it's working fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.