From Zero to API Cache w Grape & MongoDB in 10 minutes
summary
Shows a concrete recipe and a working open‑source gem called Garner that plugs into Grape & MongoDB (Mongoid) to add server‑side caching, ETags and 304 responses. Implements binding-based cache keys (route, model class, instance, role partitions), supports invalidate-by-class/instance, and answers If-None-Match without executing expensive rendering or DB work. Claims production use at Art.sy with large CPU savings and a zero-to-cache demo that fits in 10 minutes.
AI-written summary · about
chapters (9)
- 0:00Intro
- 1:26Grape
- 2:48LastModified
- 3:53NotModified
- 5:02Generic Cache Key
- 6:21Rolebased Access
- 7:11Invalidation
- 7:44If Not Match
- 8:41Recap
related talks
35mThe Grapes of Rapid
37mCache is King: Get the Most Bang for Your Buck From Ruby
30mCaching Without Marshal
04mBuilding REST API with Grape
33mCache is King: Get the Most Bang for Your Buck From Ruby
01h 09mFlash Talks
27mMongo: An unexpected journey
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
