vologa
vologa

Reputation: 37

Is it possible use MongoDb capped collection with phalcon Collection models

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?

Upvotes: 2

Views: 75

Answers (1)

Alex
Alex

Reputation: 21766

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 } )

Upvotes: 1

Related Questions