forked from for-GET/http-decision-diagram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
httpdd-cache-retrieve.fsm.cosmogol
75 lines (57 loc) · 1.71 KB
/
httpdd-cache-retrieve.fsm.cosmogol
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
65
66
67
68
69
70
71
72
73
74
75
Title = "HTTP Decision Diagram - Cache Retrieve";
Version = "v1.0.201410";
Description = "An activity diagram to describe the resolution of cache retrieval, given various methods and headers, implemented via semantical callbacks.";
Initial = start;
Final = finish;
start:anything -> block_cache_retrieve;
last:anything -> finish;
block_cache_retrieve:anything -> storage_has_uri_match;
storage_has_uri_match:false -C2,C7-> 0_PASS;
storage_has_uri_match:true -> is_method_cacheable;
is_method_cacheable:false -C3,C7-> 0_PASS;
is_method_cacheable:true -> storage_has_headers_match;
storage_has_headers_match:false -C4,C7-> 0_PASS;
storage_has_headers_match:true -> cache_control_has_no_cache_directive;
cache_control_has_no_cache_directive:true -A5,A6-> 1_REVALIDATE;
cache_control_has_no_cache_directive:false -> storage_has_no_cache_directive;
storage_has_no_cache_directive:true -A6-> 1_REVALIDATE;
storage_has_no_cache_directive:false -> storage_is_fresh;
storage_is_fresh:false -C7-> 0_PASS;
storage_is_fresh:true -B8-> 2_RETRIEVE;
0_PASS:anything -> last;
1_REVALIDATE:anything -A6,A7-> storage_is_fresh;
2_RETRIEVE:anything -> last;
anything,
true,
false
: message;
0_PASS,
1_REVALIDATE,
2_RETRIEVE,
block_cache_retrieve,
cache_control_has_no_cache_directive,
finish:B10,
is_method_cacheable,
last,
start:B1,
storage_has_headers_match,
storage_has_no_cache_directive,
storage_has_uri_match,
storage_is_fresh
: state;
cache_control_has_no_cache_directive:B5,
is_method_cacheable:B3,
last:B9,
storage_has_headers_match:B4,
storage_has_no_cache_directive:B6,
storage_has_uri_match:B2,
storage_is_fresh:B7
: decision;
0_PASS,
1_REVALIDATE,
2_RETRIEVE
: status_code;
block_cache_retrieve:B2
: block_entry;
block_cache_retrieve
: block;