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
120
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
Transcript
7 slides
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"
More Decks by David Moulton
See All by David Moulton
OpenWest Ionic Presentation
dmoulton
2
85
Faye URUG Presentation
dmoulton
1
98
Other Decks in Programming
See All in Programming
Distance field of Julia set
kinakomoti321
0
340
protojson における文字化けの扱い
kazuki1023
0
470
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
510
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
270
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
120
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
240
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
450
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
620
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
The Mindset for Success: Future Career Progression
greggifford
PRO
0
570
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540
Bash Introduction
62gerente
615
220k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
380
What's in a price? How to price your products and services
michaelherold
247
13k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
370
GitHub's CSS Performance
jonrohan
1033
470k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k