-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/cache'
* origin/cache: first version of a cache-retrieve diagram first version of a cache-store diagram
- Loading branch information
Showing
2 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Title = "HTTP Decision Diagram - Cache Retrieve"; | ||
Version = "v1.0.201402"; | ||
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 -> 0_PASS; | ||
storage_has_uri_match:true -> is_method_cacheable; | ||
is_method_cacheable:false -> 0_PASS; | ||
is_method_cacheable:true -> storage_has_headers_match; | ||
storage_has_headers_match:false -> 0_PASS; | ||
storage_has_headers_match:true -> cache_control_has_no_cache_directive; | ||
cache_control_has_no_cache_directive:true -> 1_REVALIDATE; | ||
cache_control_has_no_cache_directive:false -> storage_has_no_cache_directive; | ||
storage_has_no_cache_directive:true -> 1_REVALIDATE; | ||
storage_has_no_cache_directive:false -> storage_is_fresh; | ||
storage_is_fresh:false -> 0_PASS; | ||
storage_is_fresh:true -> 2_RETRIEVE; | ||
|
||
|
||
0_PASS:anything -> last; | ||
1_REVALIDATE:anything -> 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, | ||
is_method_cacheable, | ||
last, | ||
start, | ||
storage_has_headers_match, | ||
storage_has_no_cache_directive, | ||
storage_has_uri_match, | ||
storage_is_fresh | ||
: state; | ||
|
||
|
||
0_PASS, | ||
1_REVALIDATE, | ||
2_RETRIEVE | ||
: outcomes; | ||
|
||
|
||
block_cache_retrieve | ||
: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Title = "HTTP Decision Diagram - Cache Store"; | ||
Version = "v1.0.201402"; | ||
Description = "An activity diagram to describe the resolution of cache storage, given various methods and headers, implemented via semantical callbacks."; | ||
Initial = start; | ||
Final = finish; | ||
|
||
|
||
start:anything -> block_cache_store; | ||
last:anything -> finish; | ||
|
||
|
||
block_cache_store:anything -> is_method_cacheable; | ||
is_method_cacheable:false -> 0_DONT_STORE; | ||
is_method_cacheable:true -> is_status_code_cacheable; | ||
is_status_code_cacheable:false -> 0_DONT_STORE; | ||
is_status_code_cacheable:true -> cache_control_has_no_store_directive; | ||
cache_control_has_no_store_directive:true -> 0_DONT_STORE; | ||
cache_control_has_no_store_diective:false -> is_shared_cache; | ||
is_shared_cache:false -> cache_control_has_cacheable_directive; | ||
is_shared_cache:true -> cache_control_has_private_directive; | ||
cache_control_has_cacheable_directive:false -> 0_DONT_STORE; | ||
cache_control_has_cacheable_directive:true -> 1_STORE; | ||
cache_control_has_private_directive:true -> 0_DONT_STORE; | ||
cache_control_has_private_directive:false -> request_has_authorization; | ||
request_has_authorization:false -> cache_control_has_cacheable_directive; | ||
request_has_authorization:true -> cache_control_has_revalidate_directive; | ||
cache_control_has_revalidate_directive:false -> 0_DONT_STORE; | ||
cache_control_has_revalidate_directive:true -> 1_STORE; | ||
|
||
|
||
0_DONT_STORE:anything -> last; | ||
1_STORE:anything -> last; | ||
|
||
|
||
anything, | ||
true, | ||
false | ||
: message; | ||
|
||
|
||
0_DONT_STORE, | ||
1_STORE, | ||
block_cache_store, | ||
cache_control_has_no_store_directive, | ||
cache_control_has_private_directive, | ||
cache_control_has_revalidate_directive, | ||
is_method_cacheable, | ||
is_shared_cache, | ||
is_status_code_cacheable, | ||
last, | ||
request_has_authorization, | ||
start | ||
: state; | ||
|
||
|
||
0_DONT_STORE, | ||
1_STORE | ||
: outcomes; | ||
|
||
|
||
block_cache_store | ||
: block; |