Skip to content

Instantly share code, notes, and snippets.

@cjwebb
Created December 17, 2012 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjwebb/4322490 to your computer and use it in GitHub Desktop.
Save cjwebb/4322490 to your computer and use it in GitHub Desktop.
MongoDb: Create TTL index on collection
db.user_invites.ensureIndex( { "expiry_time": 1 }, { expireAfterSeconds: 1 } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment