Added some fragment caching
This commit is contained in:
parent
17de46d849
commit
f5360b5e9e
|
@ -1,5 +1,7 @@
|
||||||
<% @products = (@templates if type.eql?('templates')) || (@extensions if type.eql?('extensions')) %>
|
<% @products = (@templates if type.eql?('templates')) || (@extensions if type.eql?('extensions')) %>
|
||||||
<% @products.each do |product| %>
|
|
||||||
|
<% cache [ 'product list', expires_in: 60.seconds ] do %>
|
||||||
|
<% @products.each do |product| %>
|
||||||
<div class="card-content <%= type == 'templates' ? type : 'apps' %>">
|
<div class="card-content <%= type == 'templates' ? type : 'apps' %>">
|
||||||
<div class="card-inner">
|
<div class="card-inner">
|
||||||
<div class="cover">
|
<div class="cover">
|
||||||
|
@ -10,10 +12,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<%= content_tag(:h2, (link_to product.title, product), :class => "item-title") %>
|
<%= content_tag(:h2, (link_to product.title, product), :class => "item-title") %>
|
||||||
<%= content_tag(:p, (link_to "Developer: "+product.author, "/"+type+"/developer?id=rulingcom"), :class => "developer-title") %>
|
<%= content_tag(:p, (link_to "Developer: #{product.author}"), :class => "developer-title") %>
|
||||||
<%= render :partial => "shared/stars_rank" if type != 'templates' %>
|
<%= render :partial => "shared/stars_rank" if type != 'templates' %>
|
||||||
<%= content_tag(:p, product.price.nil?.eql?(true) ? 'Free' : product.price, :class => "price-container") %>
|
<%= content_tag(:p, product.price.nil?.eql?(true) ? 'Free' : product.price, :class => "price-container") %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue