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
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
Data-Centric Kaggle
isax1015
2
680
CSC307 Lecture 05
javiergs
PRO
0
480
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
CSC307 Lecture 01
javiergs
PRO
0
680
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
200
クラウドに依存しないS3を使った開発術
simesaba80
0
230
Deno Tunnel を使ってみた話
kamekyame
0
340
組織で育むオブザーバビリティ
ryota_hnk
0
130
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
260
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
190
CSC307 Lecture 03
javiergs
PRO
1
480
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
400
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
800
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
A better future with KSS
kneath
240
18k
Everyday Curiosity
cassininazir
0
120
Technical Leadership for Architectural Decision Making
baasie
1
220
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Producing Creativity
orderedlist
PRO
348
40k
Designing Experiences People Love
moore
143
24k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
520
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
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"