acorncache presentation at boston ruby group
TRANSCRIPT
vincedevendra@vincedevendra
m
A Customized Approach to HTTP Proxy Caching in Ruby
Vince DeVendra
An HTTP proxy caching gem for Rack-based Ruby applications
Authors: Vince DeVendra and Perry Carbone
github.com/acorncache/acorn-cache
The Goals of HTTP Caching
Decrease page load times and the burden on your server
Two Types of HTTP Caching
Client (Browser) Caching
Internet
Web Server
Cached data stored here
Proxy Caching
Internet
Application Server
Cached data stored here
Proxy Cache Server
Where Does AcornCache Fit In?
Internet
Middleware Stack ExampleIncoming Request AcornCach
e
Middleware 2
Middleware 3..n
Application
Server ResponseReques
t
Outgoing Cached Response
Middleware Stack ExampleIncoming Request AcornCach
e
Middleware 2
Middleware 3..n
Application
Outgoing Server Response
Server ResponseReques
t
Why Did We Build It?
+
=
Does it Work?
Does it Work?
Does it Work?
Complexity
Request Time
With Acorn Cache
Without AcornCache
Getting Started
CACHE ALL THE THINGS!
What to Cache With?
Rack::AcornCache
Cached Response
Server Response Request
Initial Object Model
Respecting Cache Control Headers
This should be easy, right?
Pondering the Ethical Implications
of RFC Protocols
Rack::AcornCache
Expanded Object Model
Cache Controller
Cache Maintenance
Cached Response
Cache Control Header
Server Response
Cache Control Header
RequestCache Control Header
Thinking About Thread Safety
Exception Handling
Because SometimesThere Are Unforeseen
Complications
Exception Handling
Allowing for Customization
Implement Page Rules
Pure Ruby FTW
Isn’t This All Against the Rules?
Future Plans
An HTTP proxy caching gem for Rack-based Ruby applications
github.com/acorncache/acorn-cache
Please Contribute!
vincedevendra@vincedevendra
Vince DeVendra
Looking for Work!