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|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
@campaign = Campaign.current rescue nil
|
@campaign = Campaign.current rescue nil
|
||||||
unless localized_fragment_exist?('items#index newest_items')
|
@newest_items = Item.newest.includes(:translations).limit(18)
|
||||||
@newest_items = Item.newest.includes(:translations).limit(18)
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
format.js { render json: {error: '$q required'}}
|
format.js { render json: {error: '$q required'}}
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,6 @@ class Item
|
||||||
|
|
||||||
def self.expire_newest_items
|
def self.expire_newest_items
|
||||||
expire_fragment_in_all_locales('outfits#new newest_items')
|
expire_fragment_in_all_locales('outfits#new newest_items')
|
||||||
expire_fragment_in_all_locales('items#index newest_items')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -28,10 +28,9 @@
|
||||||
%dt= t '.examples.type.query'
|
%dt= t '.examples.type.query'
|
||||||
%dd= t '.examples.type.description'
|
%dd= t '.examples.type.description'
|
||||||
|
|
||||||
- localized_cache 'items#index newest_items' do
|
#search-new-items
|
||||||
#search-new-items
|
%h2= t '.newest_items.header'
|
||||||
%h2= t '.newest_items.header'
|
= render @newest_items
|
||||||
= render @newest_items
|
|
||||||
|
|
||||||
- localized_cache :action_suffix => 'species_search_links' do
|
- localized_cache :action_suffix => 'species_search_links' do
|
||||||
#species-search-links
|
#species-search-links
|
||||||
|
|
Loading…
Reference in a new issue