Created
June 19, 2013 08:54
-
-
Save relax-more/5812779 to your computer and use it in GitHub Desktop.
[MongoDB] set TTL in collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.2.x からの新機能で、CollectionのDataにTTLを設定できる | |
詳しくはこちら。 | |
http://docs.mongodb.org/manual/tutorial/expire-data/ | |
実装に関してはこちら。 | |
http://www.codeproject.com/Tips/467689/MongoDB-Time-To-Live-TTL-Collections | |
(java のensureIndex からは適用できなかったのでshell から実施。MongoDB Version:2.4, MongoDB JavaDriver:2.11.1 ) | |
■参照・余談 | |
http://docs.mongodb.org/manual/tutorial/create-a-unique-index/ | |
http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment