These are chat archives for Automattic/mongoose

May 2015
Jake Cross
May 09 2015 11:36
I'm trying to check if a model exists with a certain 'username'. Whenever I check to see if the user exists, even if they don't it says they do. Any ideas? Code:
May 09 2015 16:11
Judging by your code, you have just started to write in js. You need to pass a callback in userExists. The code works asynchronously!
Valeri Karpov
May 09 2015 17:14
@aredo nope, never really been a concern for me since MongoDB isn't like SQL where you need memcached to get anything resembling decent performance - 1 doc = 1 contiguous block on disk and mmapped files make it so you effectively have a built-in LRU cache
Hengki Sihombing
May 09 2015 17:16
@vkarpov15 any some plugins for mongoose with LRU cache maybe you ever seen? before i created one?
Joe Gornick
May 09 2015 17:47
Hey guys, is it a bad idea to create an array of embedded documents where each item in the array will contain 1 of 3 properties and it's value? Here's my schema:
Essentially my first idea was that an item in channels could have { tag: 'fuel' } and another item in channels could have { number: 1 }.
But if I understand correctly, the way that I have this modeled right now, tag, name and number will be in each inserted item in channels even if I specify only a tag?