-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsimple_cache_proxy.xml
51 lines (51 loc) · 1.84 KB
/
simple_cache_proxy.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="simple_cache_proxy"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<log>
<property name="testing" value="Request arrives in to InSequence"/>
</log>
<cache collector="false" timeout="20">
<onCacheHit>
<log level="custom">
<property name="testing" value="Cache Hit"/>
</log>
<respond/>
</onCacheHit>
<protocol type="HTTP">
<methods>*</methods>
<headersToExcludeInHash/>
<responseCodes>.*</responseCodes>
<enableCacheControl>false</enableCacheControl>
<includeAgeHeader>false</includeAgeHeader>
<hashGenerator>org.wso2.carbon.mediator.cache.digest.DOMHASHGenerator</hashGenerator>
</protocol>
<implementation maxSize="1000"/>
</cache>
<log>
<property name="testing" value="Hi, I am after Cache"/>
</log>
<send>
<endpoint>
<address uri="http://www.mocky.io/v2/5c71685c3500005a00e9e82fl"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log>
<property name="testing" value="Hi, I in the top of Out Sequence"/>
</log>
<cache collector="true"/>
<log>
<property name="testing" value="I am in Out Sequence and below the Cache"/>
</log>
<send/>
</outSequence>
</target>
<description/>
</proxy>