• J
    view_cache_dependency API · 70e684a6
    Jamis Buck 提交于
    A declarative API for specifying dependencies that affect template
    cache digest computation. In your controller, specify any of said
    dependencies:
    
      view_cache_dependency { "phone" if using_phone? }
    
    When the block is evaluated, the resulting value is included in the
    cache digest calculation, allowing you to generate different digests
    for effectively the same template. (Mostly useful if you're mucking
    with template load paths.)
    70e684a6
digestor_test.rb 4.9 KB