당신은 예 (shamelessly reposted)로, wget과를 사용하여 배포 중에 캐시를 따뜻하게 시도 할 수 있습니다 : 당신이 당신의 새로운 전개에 심볼릭 링크를 전환 한 후
wget -r -nd --delete-after http://whatever.com/~popular/page/
그러나이 실행되어야 할 것이다. 어쩌면 좀 더 세련된 해결책은 배포에서 자산 캐싱 메소드를 수동으로 호출하는 것일 수 있지만, 그럴 가능성은 확실하지 않습니다. Here's where the caching is performed in Rails :
# File vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 273
273: def javascript_include_tag(*sources)
274: options = sources.extract_options!.stringify_keys
275: concat = options.delete("concat")
276: cache = concat || options.delete("cache")
277: recursive = options.delete("recursive")
278:
279: if concat || (ActionController::Base.perform_caching && cache)
280: joined_javascript_name = (cache == true ? "all" : cache) + ".js"
281: joined_javascript_path = File.join(joined_javascript_name[/^#{File::SEPARATOR}/] ? ASSETS_DIR : JAVASCRIPTS_DIR, joined_javascript_name)
282:
283: unless ActionController::Base.perform_caching && File.exists?(joined_javascript_path)
284: write_asset_file_contents(joined_javascript_path, compute_javascript_paths(sources, recursive))
285: end
286: javascript_src_tag(joined_javascript_name, options)
287: else
288: expand_javascript_sources(sources, recursive).collect { |source| javascript_src_tag(source, options) }.join("\n")
289: end
290: end
당신은 캐싱 코드를 수정하고 배포에 수동으로 실행할 수 있습니다.
몇 가지 질문 : 1) 서로 다른 컴퓨터에 여러 개의 앱 서버가 있습니까? 2) 템플릿의 CSS 캐시 라인은 무엇입니까? – scottd
안녕하세요. 한 대의 컴퓨터에있는 모든 앱 서버. 다음은 CSS 캐시 라인의 예입니다 :'% = stylesheet_link_tag 'reset', 'global', 'admins', 'autocomplete', 'dates_input', 'tablesorter', 'partners', 'jqmodal' > 'screen', : cache => set_asset_cache (: admins) %>'우리는 관리자, 구매자, 판매자, 방문 페이지 등을 위해 별도의 레이아웃을 사용합니다 (레이아웃 당 하나). 감사! –