我必须开发跨域的单点登录的多站点应用程序(类似谷歌帐户,有多个谷歌服务,如Gmail,文档,谷歌+):

在Rails 3.1上实现这个的最佳策略是什么?可伸缩性,性能和安全性非常重要.
我需要获得缓存条目的过期或创建时间.
这适用于:sitemap索引,索引中的每个站点地图都是缓存操作.我想添加
<lastmod>属性,在我的情况下,将是缓存条目创建时间.
例如,对于动作缓存:
class ProductsController < ActionController
caches_action :index
def index
@products = Product.all
end
end
Run Code Online (Sandbox Code Playgroud)
我需要这样的东西:
Rails.cache.get(:controller=>'products',:action=>'index').created_at
Run Code Online (Sandbox Code Playgroud) 我在寻找的伪类:has中引入nokogiri.它应该像jQuery的has选择器一样工作.
例如:
<li><h1><a href="dfd">ex1</a></h1><span class="string">sdfsdf</span></li>
<li><h1><a href="dsfsdf">ex2</a></h1><span class="string"></span></li>
<li><h1><a href="sdfd">ex3</a></h1></li>
Run Code Online (Sandbox Code Playgroud)
CSS选择器应该只返回第一个链接,即带有非空span.string兄弟的链接.
在jQuery中,这个选择器效果很好:
$('li:has(span.string:not(:empty))>h1>a')
Run Code Online (Sandbox Code Playgroud)
但不是在Nokogiri:
Nokogiri::HTML(html_source).css('li:has(span.string:not(:empty))>h1>a')
Run Code Online (Sandbox Code Playgroud)
:not并且:empty效果很好,但不是:has.
:has伪类?这是一个如何编写选择器的示例:regexp.li:has(span.string:not(:empty))>h1>a?