Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3847

Pluck duplicates first 101 records for query cache

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None

      Hi, I use QueryCache in project. When I call .pluck(:id) at first time result duplicates first 101 ids.

      2.0.0-p576 :029 > Mongoid::QueryCache.clear_cache
       => nil 
      2.0.0-p576 :030 > Mongoid::QueryCache.cache {Unit.where(source: s).pluck(:id).count}
       => 677 
      2.0.0-p576 :031 > Mongoid::QueryCache.cache {Unit.where(source: s).pluck(:id).count}
       => 576 
      

      In fact there are 576 records in database.

            Assignee:
            Unassigned Unassigned
            Reporter:
            cheredon cheredon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: