2

I use some mongoDb collection for logs, so I want use MongoDb capped collection.

Can I use phaclon Collection for doing it, or I should code log rotation inside my log model?

vologa
  • 37
  • 1
  • 5

1 Answers1

1

I don't think Phalcon supports creation of a capped collection, however, you could create this collection in the MongoDB shell and then use it in Phalcon:

db.createCollection("log", { capped : true, size : 5242880, max : 5000 } )
Alex
  • 21,273
  • 10
  • 61
  • 73