add caching for sitemap.xml
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<%# cache("sitemap", :expires_in => 24.hours) do %>
|
<% cache("sitemap", :expires_in => 24.hours) do %>
|
||||||
<% @popular_search_service.each_search do |tags, count| %>
|
<% @popular_search_service.each_search do |tags, count| %>
|
||||||
<url>
|
<url>
|
||||||
<loc><%= posts_url(tags: tags) %></loc>
|
<loc><%= posts_url(tags: tags) %></loc>
|
||||||
@@ -37,5 +37,5 @@
|
|||||||
<lastmod><%= post.created_at.to_date %></lastmod>
|
<lastmod><%= post.created_at.to_date %></lastmod>
|
||||||
</url>
|
</url>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# end %>
|
<% end %>
|
||||||
</urlset>
|
</urlset>
|
||||||
Reference in New Issue
Block a user