Merb_piece_cache

码农软件 · 软件分类 · 缓存系统 · 2019-08-30 19:27:14

软件介绍

Merb_piece_cache 是一个小型的Ruby库,用以提供给 Merb 框架来缓存 HTML 片段。

示例代码:

    <!-- rendered every time (because never cached) -->
<% if @user %>
Hello <%=h @user %>!
<% else %>
<a target="_blank" rel="nofollow" href="/login">Login</a>
<% end %>

<!-- rendered only when cache is expired or not found -->
<% lifetime = 5*60 # sec, default is nil(=infinity) %>
<% cache_with("members/index", lifetime) do %>
<ul>
<% for member in @members %>
<li><%=h @member.name %></li>
<% end %>
<ul>
<% end %>

本文地址:https://www.codercto.com/soft/d/13522.html

A Project Guide to UX Design

A Project Guide to UX Design

Russ Unger、Carolyn Chandler / New Riders Press / 2009-3-23 / USD 39.99

"If you are a young designer entering or contemplating entering the UX field this is a canonical book. If you are an organization that really needs to start grokking UX this book is also for you. " -......一起来看看 《A Project Guide to UX Design》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具