Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cache'
Browse files Browse the repository at this point in the history
* origin/cache:
  first version of a cache-retrieve diagram
  first version of a cache-store diagram
  • Loading branch information
andreineculau committed Oct 18, 2014
2 parents fb366a6 + 430f096 commit dd6f377
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
60 changes: 60 additions & 0 deletions httpdd-cache-retrieve.fsm.cosmogol
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;
62 changes: 62 additions & 0 deletions httpdd-cache-store.fsm.cosmogol
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;

0 comments on commit dd6f377

Please sign in to comment.