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
David Moulton
November 13, 2012
Programming
110
0
Share
Rails Caching Basics
Delivered at the 11/2012 UV.rb
David Moulton
November 13, 2012
More Decks by David Moulton
See All by David Moulton
OpenWest Ionic Presentation
dmoulton
2
83
Faye URUG Presentation
dmoulton
1
93
Other Decks in Programming
See All in Programming
感情を設計する
ichimichi
5
1.4k
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
20
7.9k
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
200
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
690
CDK Deployのための ”反響定位”
watany
4
720
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
280
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
210
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.3k
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
270
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
880
存在論的プログラミング: 時間と存在を記述する
koriym
5
870
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
4 Signs Your Business is Dying
shpigford
187
22k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
330
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to make the Groovebox
asonas
2
2.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
480
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Ruling the World: When Life Gets Gamed
codingconduct
0
200
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
150
Faster Mobile Websites
deanohume
310
31k
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"