forked from OpenNeo/impress
Remove newest_items caching from items page
Yeah I'm very unconvinced of the merit of saving us one items/translations query lmao
This commit is contained in:
parent
3ea22e6977
commit
e9c16891c8
3 changed files with 4 additions and 8 deletions
|
@ -46,9 +46,7 @@ class ItemsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
@campaign = Campaign.current rescue nil
|
||||
unless localized_fragment_exist?('items#index newest_items')
|
||||
@newest_items = Item.newest.includes(:translations).limit(18)
|
||||
end
|
||||
}
|
||||
format.js { render json: {error: '$q required'}}
|
||||
end
|
||||
|
|
|
@ -14,7 +14,6 @@ class Item
|
|||
|
||||
def self.expire_newest_items
|
||||
expire_fragment_in_all_locales('outfits#new newest_items')
|
||||
expire_fragment_in_all_locales('items#index newest_items')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -28,7 +28,6 @@
|
|||
%dt= t '.examples.type.query'
|
||||
%dd= t '.examples.type.description'
|
||||
|
||||
- localized_cache 'items#index newest_items' do
|
||||
#search-new-items
|
||||
%h2= t '.newest_items.header'
|
||||
= render @newest_items
|
||||
|
|
Loading…
Reference in a new issue