Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MongoDBが時間に基づいてドキュメントの削除を自動的に処理する方法はありますか?
私はTornado(Python)を使用IOLoopしており、それを実行できますが、常に時間をチェックし、それらのドキュメントの寿命は長いです(6マウント)。
IOLoop
では、Mongodbは、クリック可能なスクリプトを作成したり、IOLoopを使用したりせずにそれを実行できますか?
はい、これはTTL(存続可能時間)インデックスと呼ばれる機能(2.1の新機能)です。
あなたはここで例を含むそれらについてのすべてを読むことができます:
http://docs.mongodb.org/manual/tutorial/expire-data/