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

Document best practice for managing MongoClient instances

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Unknown Unknown
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: