Move organization profile image cache to Redis (#4930) [deploy]
This commit is contained in:
parent
59e9971d06
commit
e5d438efb0
1 changed files with 20 additions and 20 deletions
|
|
@ -1,25 +1,25 @@
|
|||
<% if organization && organization.bg_color_hex.present? %>
|
||||
<% cache("article-organization-details-#{organization.id}-#{organization.updated_at}", expires_in: 100.hours) do %>
|
||||
<div class="org-branding" id="org-branding">
|
||||
<div class="inner">
|
||||
<div class="content">
|
||||
<div class="name"><a href="/<%= organization.slug %>"><%= organization.name %></a></div>
|
||||
<div class="summary"><%= organization.summary %></div>
|
||||
<p class="social">
|
||||
<% if organization.twitter_username.present? %>
|
||||
<a href="https://twitter.com/<%= organization.twitter_username %>" target="_blank" rel="noopener">@<%= organization.twitter_username %></a>
|
||||
<% end %>
|
||||
<% if organization.website_url.present? %>
|
||||
<a href="<%= organization.website_url %>" target="_blank" rel="noopener"><%= beautified_url organization.website_url %></a>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="profile-image">
|
||||
<a href="/<%= organization.slug %>">
|
||||
<div class="org-branding" id="org-branding">
|
||||
<div class="inner">
|
||||
<div class="content">
|
||||
<div class="name"><a href="/<%= organization.slug %>"><%= organization.name %></a></div>
|
||||
<div class="summary"><%= organization.summary %></div>
|
||||
<p class="social">
|
||||
<% if organization.twitter_username.present? %>
|
||||
<a href="https://twitter.com/<%= organization.twitter_username %>" target="_blank" rel="noopener">@<%= organization.twitter_username %></a>
|
||||
<% end %>
|
||||
<% if organization.website_url.present? %>
|
||||
<a href="<%= organization.website_url %>" target="_blank" rel="noopener"><%= beautified_url organization.website_url %></a>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="profile-image">
|
||||
<a href="/<%= organization.slug %>">
|
||||
<% RedisRailsCache.fetch("article-organization-image-#{organization.id}-#{organization.updated_at.rfc3339}", expires_in: 100.hours) do %>
|
||||
<img src="<%= ProfileImage.new(organization).get %>" alt="<%= organization.name %>" />
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue