Skip to content
  • John Hawthorn's avatar
    785e02a2
    Cache resolvers from {append,prepend}_view_path · 785e02a2
    John Hawthorn authored
    
    
    When prepending or appending view paths, Rails will create an ActionView::Resolver
    for each String or Pathname argument. Previously, these were not cached. If view
    paths were added in a request context (which is a common thing in a multi-tenant
    application), new resolvers were created on each request. This effectively
    disabled template caching for the added view paths.
    
    Further, under certain circumstances, it also created a memory leak.
    
    This commit fixes both issues by turning dynamic view path strings into cached
    resolvers.
    
    Co-authored-by: default avatarDominik Schöler <dominik.schoeler@makandra.de>
    Co-authored-by: default avatarJohn Hawthorn <john@hawthorn.email>
    785e02a2
    Cache resolvers from {append,prepend}_view_path
    John Hawthorn authored
    
    
    When prepending or appending view paths, Rails will create an ActionView::Resolver
    for each String or Pathname argument. Previously, these were not cached. If view
    paths were added in a request context (which is a common thing in a multi-tenant
    application), new resolvers were created on each request. This effectively
    disabled template caching for the added view paths.
    
    Further, under certain circumstances, it also created a memory leak.
    
    This commit fixes both issues by turning dynamic view path strings into cached
    resolvers.
    
    Co-authored-by: default avatarDominik Schöler <dominik.schoeler@makandra.de>
    Co-authored-by: default avatarJohn Hawthorn <john@hawthorn.email>
Loading