Conversation
|
db.User.find({ ... }).cache().exec(function(err, result, cache) { ... }) The third parameter 'cache' will indicate whether the data is coming from cache or db |
FlorianSW
left a comment
There was a problem hiding this comment.
For what do you need this information? You can't do anything with it :) Also: What does true/false mean? It's not documented, so I wouldn't say, that a boolean is the best data type for this parameter :/
| cache.set(key, obj); | ||
| } | ||
| this.apply(this, arguments); | ||
| var t = Array.prototype.slice.call(arguments); |
There was a problem hiding this comment.
In order to find whether the data is coming from cache or not , I have introduced the third parameter(boolean)
|
In order to find whether the data is coming from cache or not , I have introduced the third parameter(boolean) |
|
Yeah, I understand what the PR implements, my question is: What problem do you try to fix. What is the purpose of this information. If know, if the data comes from the cache, what would you do with it differently, compared to data that does not come from the cache. What is the benefit from knowing if this is cached data :) |
|
This is additional feature, I had faced the problem two years back. So that I have added. It may use for people whoever facing similar kind of issue. |
No description provided.