Created
December 27, 2019 22:24
-
-
Save arosien/5041661ddf777453781f2865d981386a to your computer and use it in GitHub Desktop.
PlantUML diagram of HTTP caching validation
This file contains hidden or 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
@startuml | |
concise "Client" as Client | |
concise "Server" as Server | |
concise "Response freshness" as Cache | |
Server is idle | |
Client is idle | |
@Client | |
0 is send | |
Client -> Server@+25 : GET | |
+25 is await | |
+75 is recv | |
+25 is idle | |
+25 is send | |
Client -> Server@+25 : GET\nIf-Modified-Since: 150 | |
+25 is await | |
+50 is recv | |
+25 is idle | |
@100 <-> @275 : no need to re-request from server | |
@Server | |
25 is recv | |
+25 is work | |
+25 is send | |
Server -> Client@+25 : 200 OK\nExpires: 275 | |
+25 is idle | |
+75 is recv | |
+25 is send | |
Server -> Client@+25 : 304 Not Modified | |
+25 is idle | |
@Cache | |
75 is fresh | |
+200 is stale | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment