会话被设置为一个哈希: 1) "sid:lpg3um654ckqp7tj7fkr2qs2Zz" (this has a ttl of a week)
2) "sid:lpg3um654ckqp7tj7fkr2qs2Yy" (this has a ttl of 6 days)
3) "sid:g6sftph5dnun5bk6l0hqyyh6p5" (this has a ttl of 5 day
我有要求在我的应用中设置一个文档集合的TTL,但也需要这些文档被其他集合引用,我不确定这将如何工作? 设置文档上的TTL是否在所有其他参考文档过期时删除该文档,或者我必须自己编写后端进程而不使用mongoDb的TTL索引? 的功能的示例模式我会想: var mongoose = require('mongoose')
, Schema = mongoose.Schema
var pe