Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-995

Document best practice for managing MongoClient instances

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      I couldn't find best practice documentation for how to manage a MongoClient instance. Most examples just show it created by embedding it directly into a template. It's unclear whether in a real application one needs to worry about this, but I suspect that if it's done naively a new MongoClient could be created for every CRUD operation instead of one for all of them (assuming more than one is needed to process a single request.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: