Categories
- Active Record
- Active Resource
- Active Support
- Administration
- Ajax
- APIs
- Authentication
- Authorization
- Background Jobs
- Caching
- Code Walkthrough
- Controllers
- Debugging
- Deployment
- eCommerce
- Forms
- Mailing
- Models
- Performance
- Plugins
- Production
- Rack
- Rails 2.0
- Rails 2.1
- Rails 2.2
- Rails 2.3
- Rails 3.0
- Rails 3.1
- Rails 3.2
- Rails 4.0
- Refactoring
- Routing
- Search
- Security
- Testing
- Tools
- Views
Model Caching (revised)
Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record.
(12 minutes)
Cache Digests
The cache_digests gem (also included in Rails 4) will automatically add a digest to the fragment cache key based on the template. If a template changes the cache will auto-expire. But watch out for the gotchas!
(7 minutes)
Fragment Caching (revised)
If you need to cache a certain section of a page instead of the entire page, fragment caching is the way to go. Learn how caching is stored, how to create auto expiring caches, and more.
(9 minutes)
HTTP Caching
With HTTP response headers you can the cache in the user's browser and proxies. Etags, Last-Modified, Cache-Control and Rack::Cache are all covered here
(15 minutes)
Page Caching (revised)
Page caching is an efficient way to cache full content to be served by the front-end web server. Learn how to deal with pagination, expiration with sweepers, and user-specific content in this episode.
(9 minutes)
Dynamic Page Caching (revised)
Page caching is great for speeding up the performance of a page, but what if it contains user-specific content? Learn how to load content in dynamically through JavaScript in this episode.
(7 minutes)
Memcached & Dalli
Memcached is an excellent cache store, and Dalli is the best way to interact with it through Ruby. Here I show various ways to use Memcached in a Rails app including how to set it up in production.
(12 minutes)
Autocomplete Search Terms
Learn how to add autocompletion to a search form and improve performance using Rack middleware, caching and switching from SQL to Redis.
(17 minutes)
Dynamic Page Caching
Use JavaScript to allow dynamic content in a page cache. In this episode I show you how to insert the user-specific content into a page through JavaScript.
(11 minutes)
Bullet
Bullet will notify you of database queries that can potentially be improved through eager loading or counter cache column. A variety of notification alerts are supported.
(6 minutes)