title: Why does after_save not trigger when using touch?
body: <p>Recent days , I was trying to cache rails app use Redis store.
  I have two models:</p>
  
  <pre><code>class Category &lt; ActiveRecord::Base
    has_many :products
  
    after_save :clear_redis_cache
  
    private
  
      def clear_redis_cache
        puts "heelllooooo"
        $redis.del 'products'
      end
  end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    belongs_to :category, touch: true
  end
  </code></pre>
  
  <p>in controller </p>
  
  <pre><code>def index
      @products = $redis.get('products')
  
      if @products.nil?
        @products = Product.joins(:category).pluck("products.id", "products.name", "categories.name")
        $redis.set('products', @products)
        $redis.expire('products', 3.hour.to_i)
      end
  
      @products = JSON.load(@products) if @products.is_a?(String)
  
    end
  </code></pre>
  
  <p>With this code , the cache worked fine.
  But when I updated or created new product (I have used touch method in relationship) it's not trigger after_save callback in Category model.
  Can you explain me why ?</p>