Skip to content

WA-VERIFY-086: Fix Mongoid::QueryCache → Mongo::QueryCache API migration (Mongoid 8 Phase 1) #1077

Description

@kitcommerce

Summary

WA-VERIFY-083 (PR #1075) identified Mongoid::QueryCache as a HIGH severity breaking change in the Mongoid 8 upgrade path. This issue implements the migration.

Affected Call Sites (from #1069 assessment)

grep -r 'Mongoid::QueryCache' app/ lib/ config/ --include='*.rb'

Known affected files:

  • core/app/middleware/workarea/admin_search_query_wrapper.rb
  • core/app/middleware/workarea/releasable.rb
  • Rack middleware initializer

Approach

  1. Replace Mongoid::QueryCache with Mongo::QueryCache at all call sites
  2. Verify Mongo::QueryCache is available in the mongo gem version we use
  3. Add a test to confirm cache works correctly after change
  4. Run bundle exec rake test to confirm no regressions

Acceptance Criteria

  • No Mongoid::QueryCache references remain in production code
  • Mongo::QueryCache used consistently
  • Tests pass under default appraisal
  • Notes file documents the migration

Client Impact

None (internal query optimization layer; behavior unchanged).

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions