Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Caching Basics
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
David Moulton
November 13, 2012
Programming
0
110
Rails Caching Basics
Delivered at the 11/2012 UV.rb
David Moulton
November 13, 2012
Tweet
Share
More Decks by David Moulton
See All by David Moulton
OpenWest Ionic Presentation
dmoulton
2
81
Faye URUG Presentation
dmoulton
1
92
Other Decks in Programming
See All in Programming
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
Patterns of Patterns
denyspoltorak
0
1.4k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Data-Centric Kaggle
isax1015
2
770
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
0
56
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
A Modern Web Designer's Workflow
chriscoyier
698
190k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Odyssey Design
rkendrick25
PRO
1
500
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Rails Girls Zürich Keynote
gr2m
96
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Crafting Experiences
bethany
1
49
Embracing the Ebb and Flow
colly
88
5k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Transcript
Rails Caching Basics
Setup To test caching in dev mode, edit development. rb:
config.action_controller.perform_caching = true Normally this should be false
Page Caching class UsersController < ActionController caches_page :index def index
@users = User.all end ... def create ... expire_page :action => :index end end
Action Caching Can be used when you need to be
authorized to view a page but want to cache it as well.
Fragment Caching cache part of a page <% cache(:action =>
'index', :action_suffix => 'all_users')do %> @users.each do |u| ... <% end %>
Sweepers More centralized location for taking care of cache invalidation
Cache Stores Config config.cache_store = :memory_store config.cache_store = :memory_store, :size
=> 64.megabytes config.cache_store = :file_store, "path/to/cachedir" config.cache_store = :memcache_store, "cache.example.com"