I know there are other questions about this issue; none, (that I have tried), have resolved my problem.
Using MongoDB 3.2.1, Mongoose 4.4.x, Node 0.12.9 or 4.2.6.
Mongoose Schema looks like:
var schema = new Schema({
userId: {type: Schema.Types.ObjectId, ref: 'User', required: true},
createdAt: {type: Date, required: true, default: Date.now, expires: 10}
});
Index is verified both in Mongo Shell and RoboMongo:
I've tried setting the TTL index on different fields, using different methods of creating the index, and some other things. Yet the documents remain, even after letting it sit overnight, and editing the createdAt field to be a time in the past.
Thoughts?
