【发布时间】:2012-10-11 10:50:49
【问题描述】:
是否可以让 herokus 网络服务器在子域上执行唯一键控的全页缓存(可能使用机架中间件?)
即。
class MyController < ApplicationController
caches_page :index
def index
@content = MyObject.find(request.subdomain)
...
subdomain1.myapp.com > <cachedir>/subdomain1/index.html
subdomain2.myapp.com > <cachedir>/subdomain2/index.html
以下技术需要对 nginx 的重写访问权限,这似乎无法在 heroku 上配置:
http://www.agileproductions.com/blog_posts/16-Page-Caching-by-Subdomain-in-Rails-and-Nginx
https://github.com/yeah/page_cache_fu
【问题讨论】:
标签: ruby-on-rails caching heroku subdomain