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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
84
Faye URUG Presentation
dmoulton
1
96
Other Decks in Programming
See All in Programming
T3DD26: From RAGs to Riches
martinhelmich
0
120
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.9k
Dockerfile CMD for Node.js
grazie1999
0
150
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
320
高専キャリア LT 発表内容
crysta1221
6
5k
MySQLとPostgreSQLって何が違うの?
akagami
0
150
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
190
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
110
信頼性の目標を誰も求めてない
shubox
0
410
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
170
リアルな遅延を測る仕様
kota_yata
1
130
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
390
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
The Invisible Side of Design
smashingmag
301
52k
Prompt Engineering for Job Search
mfonobong
0
420
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
It's Worth the Effort
3n
188
29k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
A designer walks into a library…
pauljervisheath
211
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
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"