Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
0
170
AmebaブログはKMPから卒業します
kmars0605
0
190
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
ActionController meets Protocol Buffers
sorah
0
530
気持ちぃ〜角丸 Squircle
ryu1013
0
310
R8 の設定見直しでアプリサイズ削減
andpad
0
220
sbt 2.0: takeoff
eed3si9n
0
160
カツオ、ご期待ください
suneo3476
0
190
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
890
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Navigating Team Friction
lara
192
16k
Done Done
chrislema
187
17k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Exploring anti-patterns in Rails
aemeredith
4
540
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
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"