This repository was archived by the owner on Oct 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathset-variable-cache-hit_v2.xml
More file actions
64 lines (62 loc) · 2.08 KB
/
set-variable-cache-hit_v2.xml
File metadata and controls
64 lines (62 loc) · 2.08 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
<match:metadata-stage value="client-response">
<assign:variable>
<name>PMUSER_CACHE_STATE</name>
<value>%(AK_CONTENT_SOURCE)</value>
</assign:variable>
<assign:variable>
<name>PMUSER_IS_CACHE_HIT</name>
<value>0</value>
</assign:variable>
<assign:variable>
<name>PMUSER_IS_CACHE_MISS</name>
<value>0</value>
</assign:variable>
<assign:variable>
<name>PMUSER_IS_NOSTORE</name>
<value>1</value>
</assign:variable>
<match:response.cacheability value="cacheable" result="true">
<assign:variable>
<name>PMUSER_IS_NOSTORE</name>
<value>0</value>
</assign:variable>
<match:variable name="PMUSER_CACHE_STATE" value="*d* *i* *m* *g* *n*" value-wildcard="on">
<match:variable name="PMUSER_CACHE_STATE" value="*o* *p*" value-wildcard="on" result="false">
<assign:variable>
<name>PMUSER_IS_CACHE_HIT</name>
<value>1</value>
</assign:variable>
</match:variable>
</match:variable>
<match:variable name="PMUSER_IS_CACHE_HIT" value="0">
<assign:variable>
<name>PMUSER_IS_CACHE_MISS</name>
<value>1</value>
</assign:variable>
</match:variable>
</match:response.cacheability>
<match:request.type result="false" value="CLIENT_REQ">
<edgeservices:modify-outgoing-response.add-header>
<name>X-Remote-Cache-State</name>
<value>%(PMUSER_CACHE_STATE)</value>
<status>on</status>
<edge-only>off</edge-only>
</edgeservices:modify-outgoing-response.add-header>
</match:request.type>
<match:response.header name="X-Remote-Cache-State">
<assign:extract-value>
<variable-name>PMUSER_REMOTE_CACHE_STATE</variable-name>
<location>Response_Header</location>
<location-id>X-Remote-Cache-State</location-id>
</assign:extract-value>
</match:response.header>
<match:request.type result="true" value="CLIENT_REQ">
<match:response.header name="X-Remote-Cache-State">
<edgeservices:modify-outgoing-response.remove-header>
<name>X-Remote-Cache-State</name>
<status>on</status>
<edge-only>off</edge-only>
</edgeservices:modify-outgoing-response.remove-header>
</match:response.header>
</match:request.type>
</match:metadata-stage>