@@ -7,17 +7,13 @@ theme: sky
7
7
8
8
### Stop Melting The Ice Caps
9
9
10
- PHP South West
10
+ APIs You Won't Hate
11
11
12
12
<small >@philsturgeon </small >
13
13
14
14
---
15
15
16
- Who leads? Client or Server?
17
-
18
- ---
19
-
20
- Caching is for the client (consumer)
16
+ Caching is not about performance. But...
21
17
22
18
---
23
19
@@ -31,7 +27,7 @@ Note: Each interaction must be the quickest possible
31
27
32
28
---
33
29
34
- REST optimizes for _ network efficiency_ over _ network speed _
30
+ HTTP Caching helps optimizes for _ network efficiency_
35
31
36
32
---
37
33
@@ -113,7 +109,7 @@ GraphQL and endpoint-APIs which fail to offer cacheability all force "naive clie
113
109
## Expiry Guessing
114
110
### Problem 1
115
111
116
- 12 hours is an ** arbitrary number** plucked out my...
112
+ 12 hours is an ** arbitrary number** I plucked out my...
117
113
118
114
brain 🤔
119
115
@@ -138,7 +134,7 @@ Client must subscribe to AMQP, WebSockets, etc. to invalidate
138
134
139
135
---
140
136
141
- REST says these problems should be a concern of the ** server**
137
+ REST says these problems should be a concern of the ** server** not the ** client **
142
138
143
139
---
144
140
@@ -203,7 +199,7 @@ HTTP/1.1 304 Not Modified
203
199
204
200
---
205
201
206
- Not Modified means "Use the response you already have"
202
+ Not Modified tells the client to use the response they already have
207
203
208
204
---
209
205
@@ -214,7 +210,7 @@ Server doesn't need to serialize JSON
214
210
``` ruby
215
211
class TurtlesController < BaseController
216
212
def show
217
- turtle = ...
213
+ turtle = Turtle .find(params[ :id ])
218
214
219
215
expires_in(15 .minutes, public: true )
220
216
if stale?(turtle)
0 commit comments