Write-through model caching for ActiveRecord