For some reason the caching files are not showing on my production website
and I see the file in public/cache directory but it is not rendering on my
site.
Any ideas as to why this is occuring. Here is the section cache statement.
Thanks


<% cache('athletes_list') do %>

<!-- This section is after yield it is the sidebar -->
</div>
</div>
<div class="span5">
<div class="hero-unit" style="background-color: #CC66CC">
<h5>Athletes On Twitter</h5>
<table>
<%@athletes.each do | athlete |%>
<tr>
<td>
<img width="30px;"class="article_image"
title="<%=athlete.first_name%><%=athlete.last_name%>"
src="<%=athlete.profile_image_url if !athlete.blank?%>"></div>
</td>
<td>
<%=link_to "#{athlete.first_name} #{athlete.last_name}",
profile_athlete_url(athlete) %>
</td>
</tr>
<% end %>
</table>

</div>
<% end %>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tk7Mo2spzWYJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Walter Lee Davis at Apr 12, 2012 at 3:48 pm

    On Apr 11, 2012, at 6:58 PM, gerbdla wrote:

    For some reason the caching files are not showing on my production website and I see the file in public/cache directory but it is not rendering on my site.
    Any ideas as to why this is occuring. Here is the section cache statement.
    Thanks


    <% cache('athletes_list') do %>

    <!-- This section is after yield it is the sidebar -->
    </div>
    </div>
    <div class="span5">
    <div class="hero-unit" style="background-color: #CC66CC">
    <h5>Athletes On Twitter</h5>
    <table>
    <%@athletes.each do | athlete |%>
    <tr>
    <td>
    <img width="30px;"class="article_image" title="<%=athlete.first_name%><%=athlete.last_name%>" src="<%=athlete.profile_image_url if !athlete.blank?%>"></div>
    </td>
    <td>
    <%=link_to "#{athlete.first_name} #{athlete.last_name}", profile_athlete_url(athlete) %>
    </td>
    </tr>
    <% end %>
    </table>

    </div>
    <% end %>
    Have you looked in your logs to see if there are permission errors when trying to save the cache files? Not sure if that would trigger a full-on error (as in your app won't run at all) or if you would just see the uncached result anyway. It's worth looking in depth at your logs to see if the cache save is working or not.

    Walter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Gerbdla at Apr 13, 2012 at 5:32 am
    Yeah there are no permission errors what is really strange is that the
    cache is only rending about 30 records but I have over a hundred
    movies

    this in the conrtroller

    @movies = Movie.find(:all ,:order =>"name")

    this in the view
    <% cache do %>
    <%= render :partial => "shared/movies", :locals => { :movies =>
    @movies } %>
    <% end %>

    wondering why I am only seeing a small subset of the data. When
    something is cached it should retrieve all the records
    and store in cache in page

    not sure why it is not showing the entire data. any ideas?



    On Apr 12, 8:47 am, Walter Lee Davis wrote:
    On Apr 11, 2012, at 6:58 PM, gerbdla wrote:








    For some reason the caching files are not showing on my production website and I see the file in public/cache directory but it is not rendering on my site.
    Any ideas as to why this is occuring.  Here is the section cache statement.
    Thanks
    <% cache('athletes_list') do %>
    <!-- This section is after yield it is the sidebar -->
    </div>
    </div>
    <div class="span5">
    <div class="hero-unit" style="background-color: #CC66CC">
    <h5>Athletes On Twitter</h5>
    <table>
    <%...@athletes.each do | athlete |%>
    <tr>
    <td>
    <img width="30px;"class="article_image" title="<%=athlete.first_name%><%=athlete.last_name%>" src="<%=athlete.profile_image_url if !athlete.blank?%>"></div>
    </td>
    <td>
    <%=link_to "#{athlete.first_name} #{athlete.last_name}", profile_athlete_url(athlete) %>
    </td>
    </tr>
    <% end %>
    </table>
    </div>
    <% end %>
    Have you looked in your logs to see if there are permission errors when trying to save the cache files? Not sure if that would trigger a full-on error (as in your app won't run at all) or if you would just see the uncached result anyway. It's worth looking in depth at your logs to see if the cache save is working or not.

    Walter
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Gerbdla at Apr 13, 2012 at 4:51 pm
    Any ideas why a partial would not render the first time I go to url
    but when I reload page it appears. This is in firefox.
    On Apr 12, 10:31 pm, gerbdla wrote:
    Yeah there are no permission errors what is really strange is that the
    cache is only rending about 30 records but I have over a hundred
    movies

    this in the conrtroller

    @movies = Movie.find(:all ,:order =>"name")

    this in the view
    <% cache do %>
    <%= render :partial => "shared/movies", :locals => { :movies =>
    @movies } %>
    <% end %>

    wondering why I am only seeing a small subset of the data.  When
    something is cached it should retrieve all the records
    and store in cache in page

    not sure why it is not showing the entire data.  any ideas?

    On Apr 12, 8:47 am, Walter Lee Davis wrote:






    On Apr 11, 2012, at 6:58 PM, gerbdla wrote:

    For some reason the caching files are not showing on my production website and I see the file in public/cache directory but it is not rendering on my site.
    Any ideas as to why this is occuring.  Here is the section cache statement.
    Thanks
    <% cache('athletes_list') do %>
    <!-- This section is after yield it is the sidebar -->
    </div>
    </div>
    <div class="span5">
    <div class="hero-unit" style="background-color: #CC66CC">
    <h5>Athletes On Twitter</h5>
    <table>
    <%...@athletes.each do | athlete |%>
    <tr>
    <td>
    <img width="30px;"class="article_image" title="<%=athlete.first_name%><%=athlete.last_name%>" src="<%=athlete.profile_image_url if !athlete.blank?%>"></div>
    </td>
    <td>
    <%=link_to "#{athlete.first_name} #{athlete.last_name}", profile_athlete_url(athlete) %>
    </td>
    </tr>
    <% end %>
    </table>
    </div>
    <% end %>
    Have you looked in your logs to see if there are permission errors when trying to save the cache files? Not sure if that would trigger a full-on error (as in your app won't run at all) or if you would just see the uncached result anyway. It's worth looking in depth at your logs to see if the cache save is working or not.
    Walter
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 11, '12 at 10:58p
activeApr 13, '12 at 4:51p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Gerbdla: 3 posts Walter Lee Davis: 1 post

People

Translate

site design / logo © 2022 Grokbase