Skip to content

Some improvments v2 ? #3

@ghost

Description

I had some problem witch you script eq 30 second freeze

  • Why every 5 millisecond connect to mongodb and check for lock
    So i use wincache can be changed to APC to store lock $ID, and add expire
  • Some fix witch names etc only for my script
    Too bad is not ->limit in mongodb when remove _gc
  • Index only are create once when server start

ADD background an unique

$this->_mongo->ensureIndex(array('_id' => true),array('background' => true, 'unique' => true ));

  • _write -> add "upsert" => true
  • When read data -> get only filed 'D' witchout _id or other array('d' => 1,'_id' => 0 )

FULL code

https://gist.github.com/2670252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions