【问题标题】:What is the best way to develop and test cache in a Ruby on rails application?在 Ruby on Rails 应用程序中开发和测试缓存的最佳方法是什么?
【发布时间】:2011-07-07 09:11:48
【问题描述】:

我正在使用 Ruby on Rails 3,我想开始“编码”缓存系统。

我正在 localhost 以 development 模式工作。我听说在开发模式下工作可能会遇到一些“令人困惑”的错误。 为什么?该缓存的最佳方式是什么?

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 caching web-applications


    【解决方案1】:

    你只需要头脑清醒。

    在development.rb 中,更改:

      config.action_controller.perform_caching = true
    

    然后工作和测试。它将缓存页面写入/public,片段写入/tmp/cache

    以下是了解 Rails 中缓存的好文章:

    http://broadcastingadam.com/2012/07/advanced_caching_revised

    【讨论】:

      猜你喜欢
      • 2011-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多