caching - rails 4 page index cache creates a index.html instead of model.html -



caching - rails 4 page index cache creates a index.html instead of model.html -

i have model named product , intend implement page caching on index action.

in gemfile have included

gem 'actionpack-page_caching' gem 'actionpack-action_caching'

in controller have

caches_page :index

in routes.rb have

resources :products, :path => "toys"

issue: in public directory html file beingness created named index.html compared expected 'products.html' or 'toys.html'

this problem hurts me when expire_page products_path on successful product create/update, application looks products.html or 'toys.html' delete, cannot find , cache not flushed.

does know why rails 4 name cached page index.html?

try add together in update create action:

expire_page action: 'index'

ruby-on-rails caching ruby-on-rails-4

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -