linvodb3 icon indicating copy to clipboard operation
linvodb3 copied to clipboard

Capped collections

Open Ivshti opened this issue 10 years ago • 1 comments

LinvoDB needs to support capped collections, like MongoDB

With the events system, this shouldn't be too hard to implement as an add-on module. The logic will be:

  1. when new documents are inserted (listen to the inserted event
  2. lookup an index we'll be capping on directly (.indexes[idxName]. ...) - e.g. an index by mtime or ctime
  3. take the documents of this index which are not in the first N (cap size) and remove them with Doc.remove()

Ivshti avatar May 08 '15 16:05 Ivshti

Capped collections would be a great addition.

Danielv123 avatar Sep 20 '17 07:09 Danielv123