{"_id":"relcache","_rev":"33-e0b90ce58281e8ba9cb06afb6251aa96","name":"relcache","description":"In memory cache for relationships.","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.1","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.  A simpler implementation and interface than an all out graph database.\n\n## Usage\n\n```coffee-script\nrelcache.set \"userId\", 5, {accountId: 1}\nrelcache.set \"userId\", 5, {userId: 8, type: 'friend'}\n\nrelcache.get \"userId\", 5            # [{accountId: 1}, {userId: 8, type: 'friend'}]\nrelcache.get \"userId\", 5, 'friend'  # {userId: 8, type: 'friend'}\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.1","dist":{"shasum":"8b4386fd9a4a1225dbc7e1ef269df483e8ee2f3e","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.1.tgz","integrity":"sha512-0gl9vykebCIGPmL6eMEAAnAk9bNmOjAqKeHreNEdgd56ILRegzoAVleVZ3rSOPMwTNQbFS58mv63CF0HCmxiYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuj4l2W8W3B2+qTZ2CBPsc/qfKyuvaC1dObQx6Qna0lAiEAowt7zHhJALltnHaSGrh0skxTthRKlQnse4N1oCgS64I="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.2","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.  A simpler implementation and interface than an all out graph database.\n\n## Usage\n\n```coffee-script\nrelcache.set \"userId\", 5, {accountId: 1}\nrelcache.set \"userId\", 5, {userId: 8, type: 'friend'}\n\nrelcache.get \"userId\", 5            # [{accountId: 1}, {userId: 8, type: 'friend'}]\nrelcache.get \"userId\", 5, 'friend'  # {userId: 8, type: 'friend'}\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.2","dist":{"shasum":"f0405eb27bf65c163048a8b82f0b9d7d6c870e76","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.2.tgz","integrity":"sha512-Zbe2LfACr2y/7NNjCutogQrjgqXWEPcTvYSGXlFJP4s404VPMyVT1MrE0Tkj8xW/DkC8ubhNm7Gqn2Uffe8s1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiWOxCOmlCJNB01CkDWXYu7EPPoydjQEHoKIy/np1ShAIgAXkIKmEX4WPepVgI4h83xvYY3bTcJpllxzMgD2COKLw="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.3","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.  A simpler implementation and interface than an all out graph database.\n\n## Usage\n\n```coffee-script\nrelcache.set \"userId\", 5, {accountId: 1}\nrelcache.set \"userId\", 5, {userId: 8, type: 'friend'}\n\nrelcache.get \"userId\", 5            # [{accountId: 1}, {userId: 8, type: 'friend'}]\nrelcache.get \"userId\", 5, 'friend'  # {userId: 8, type: 'friend'}\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.3","dist":{"shasum":"8bada92887112ab4a77ee6ff483bdc5d98b2a6c7","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.3.tgz","integrity":"sha512-8YArYS4YkWP5KUJJ6tiP09ztjH8VAZNXXMyDRxWvx+2ESmgG7+2GV6v/qhAR7qkSrpNxvz1KYK44YujO+Xa2NQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEr+jy6LPlkVNkMgI/55SvsHKbWqDW5W0pkRrca/c2dQIgaqFA24QzPuK1+Znw1kveqbTtaqDPFIXJUPK5JUqvXm0="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.4":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.4","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.  A simpler implementation and interface than an all out graph database.\n\n## Usage\n\n```coffee-script\nrelcache.set \"userId\", 5, {accountId: 1}\nrelcache.set \"userId\", 5, {userId: 8, type: 'friend'}\n\nrelcache.get \"userId\", 5            # [{accountId: 1}, {userId: 8, type: 'friend'}]\nrelcache.get \"userId\", 5, 'friend'  # {userId: 8, type: 'friend'}\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.4","dist":{"shasum":"9908f1c05d0f8bc7262426c206cbc65450119077","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.4.tgz","integrity":"sha512-TxLIeFq+3MViGC24fLv9sCIaMGIQeh9Hyoy6OeqQ5M1yXnuDGYlv9U9gQdTWHAPO0IaQWl/pYX6TdvGoyG1ODQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3wxES0q4H6qZssrmKochRkzP6dOgYprhgWrYcCPSoAAiBwMm4x/yytZk65tlrAppFZ9cCLDka71bxs4yuJKmHdZg=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.5":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.5","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.5","dist":{"shasum":"d607b61e1b474d2d3d3ecdb5616bda0a680a0375","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.5.tgz","integrity":"sha512-Ivtyw0in11rB7ZvqEWAl+TzTWMsrlG9pPTmlCSUKnAaM1WM65xX7ls1q6AxGYMJooW03Psx9JqDp1++JFcZEdQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxZrAlMVXdgnI9HJCOEwwtgYIvkHy3hewSWsC/cChthAiEA1BrITjpFYC073T539Thghh1HE1CYWdwCMIq7VIe9Rkc="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.6":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.6","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.6","dist":{"shasum":"83a81a3412384691ed7ae36aaf9fb63f5d4a2569","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.6.tgz","integrity":"sha512-XsMZUZTy1AXbibw/sf4iTocR8b2cjj56uN6J166K6kh+XXBcHCNBWEDYBNQwUvLS15oAHly66I3LZuMhSueRdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2TnmLxgjy/cLE2u/rphuLqXiNPZiTMLDweUhXVtkTaAiA2Lc/JEb41sqElxMP+JdHz+h7EWFChX9yFW5EbKgygsA=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.7","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.7","dist":{"shasum":"260cbadab3f762c29bb92fb293d312318c9c0a58","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.7.tgz","integrity":"sha512-w3xjb4xR2RPm7vVU0cDeIz0cczewmoiQNpQJfMKFvliI5w1CWexbMNSLmzMq2oX0fRf9X/t3ca+n6iNCTDv8Pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWHJRK8gzxqy/f++hYbjdo2VunUazdAeEFGRjVnuEqsQIgHgDUhT6ovliRhyslGUslD0BNTqrI560KEe04AanB0fg="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.8":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.8","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.8","dist":{"shasum":"db684cef478a1d46132d14c2c68f259e9f42c934","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.8.tgz","integrity":"sha512-U81G3kvbx+xrwlsb90OqcRAwP7trg1rOzljuL47etneDk3paqGUner0roE3qOP+MaXLC5LJsQCCf7rQVe88E5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKdyYYm0dJAGsRjWc+AawjJb7AyoDOUTy+xjY+KWxB+AiEA6Ux+7tYCS3wDq14DvmK9MJ5EV5MBXABKpb1XAU4ferg="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.9":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.9","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.9","dist":{"shasum":"26e06f382cfbb169ea875bd2f31cbd382ee568b8","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.9.tgz","integrity":"sha512-5yX02u/OmCvs0V0FUV8volPUN72Mlqv5GC9ROFbtF+kZGaYnGBFfq6Bt8rsALZ9uGVFTwg9QWvqqrlCbZGjm3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGOE6QNI34zZXCgXfOUjlpkish7+zWsHuUrpqrEd5yTxAiEA9KY0xkb3el7qhi8yDnDCgdZGhykoVh6BnJ9Xuc5sgRU="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.10":{"name":"relcache","description":"In memory cache for relationships.","version":"0.0.10","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.0.10","dist":{"shasum":"7b57ddd67ba889aa0443f9dd1c1fccc65e08746f","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.0.10.tgz","integrity":"sha512-J/eCz7CnddzLJXOmjPSRq8cbeoCvbIr2ABi+2d1lzrfX0G3PPzlvQ1c5ZcbADQFEjMCsVT9VCBV8jGvBDeYx2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4LUSxcwfgDy7YWexEsz9zU0xLeoF4kDZQJjTQp07VHAIhALh7v2M/DjKMbuCQZ9tkzdi6tY0wid+/wwZbzsrtHwJD"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0":{"name":"relcache","description":"In memory cache for relationships.","version":"0.1.0","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.1.0","dist":{"shasum":"fa65b3341c97369b5eb2159292f11862dcd8eb89","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.1.0.tgz","integrity":"sha512-D2rTFyakXfhTZrQahTSC5fYF+wsocJKko8ybCzketP95vqf/ShSo54v7EAFJTNW63/h13WV11/Ffx+yKw6G6KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY7zFlXYFXLmMbTAi+Ebqdi6WRwa8SNM5OBnvPDm/9+wIhAIKHO2pE3WpWnky/cRXEF3IjOiRNlriHfs75h8MFi9Mv"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"relcache","description":"In memory cache for relationships.","version":"0.1.1","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.1.1","dist":{"shasum":"94fa9fdd8772edd014d32f394015aa6b1d2f6588","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.1.1.tgz","integrity":"sha512-SaSlkdcXk7jloVzZRClacQRtY7CqsxYbNBEqOKuYxNaa1AMkel6v4XIxPM/Ea+KjIoi+fskOlkY+bLUDsAjvLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWZeHUGCGcQcEx1Y28hnAZzN86YVdUnwYelBcrwnCUiAIhAPZrfJPqEla3WyMBlXtCNBYFDb8mbU9yESzoxdv7c9Au"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"relcache","description":"In memory cache for relationships.","version":"0.1.2","homepage":"http://github.com/TorchlightSoftware/relcache","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"ale":"*","torch":"*","lodash":"*","coffee-script":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/relcache/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.\n\nRelationships are stored bi-directionally, and can be searched with a 'find' function.\n\nThe information is stored in a nested hash, so lookups are fast.  The data points are either single values, or Arrays which follow 'set' data structure rules, courtesy of lodash.  (i.e. they don't contain duplicate values, and we can remove items from the lists and perform unions reliably)\n\n# Storage Operators\n\n## Set\n\nSet stores many-1 relationships.  The relationships provided in the third arg are assumed to be unique to the key.  If you set the same name again, the value will be overwritten and the reverse lookup will be updated.\n\nThe first two arguments are a key and value which represent the left side of the relationship.  The third argument is a hash.  In practice this lets you set multiple relationships in one call.\n\nUse 'set' to store the fields within a record:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred', email: 'fred@foo.com'}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {name: 'Fred', email: 'fred@foo.com'}\n\n# reverse lookup\nrelcache.get \"user.name\", 'Fred'            # {user._id: [5]}\nrelcache.get \"user.email\", 'fred@foo.com'   # {user._id: [5]}\n```\n\nThe many-1 relationship in this case means many IDs could point to the same name:\n\n```coffee-script\nrelcache.set \"user._id\", 5, {name: 'Fred'}\nrelcache.set \"user._id\", 7, {name: 'Fred'}\n\nrelcache.get \"user.name\", 'Fred' # {user._id: [5, 7]}\n```\n\n## Add\n\nAdd stores many-many relationships.  If you add two relationships of the same name, the new values will be appended, not overwritten as in the case of 'set'.\n\nUse 'add' to store relationships between records:\n\n```coffee-script\n# many to many between chats and users\nrelcache.add \"user._id\", 5, {chat._id: 1}\nrelcache.add \"user._id\", 5, {chat._id: 4}\nrelcache.add \"user._id\", 6, {chat._id: 4}\n\n# direct lookup\nrelcache.get \"user._id\", 5                  # {chat._id: [1, 4]}\nrelcache.get \"user._id\", 6                  # {chat._id: [4]}\n\n# reverse lookup\nrelcache.get \"chat._id\", 1                  # {user._id: [5]}\nrelcache.get \"chat._id\", 4                  # {user._id: [5, 6]}\n```\n\n# Query Operators\n\n## Get\n\nUse the get method to perform a lookup on key equality.\n\n```coffee-script\nrelcache.get \"user._id\", 5\n```\n\nYou can also specify fields by which to filter:\n\n```coffee-script\nrelcache.get \"user._id\", 5, 'name'\nrelcache.get \"user._id\", 5, ['name', 'email']\n```\n\n## Find\n\nThe find function is what you'll want to use if an equality comparitor doesn't cut it for your use case.  It supports [MongoDB's comparison operators](http://docs.mongodb.org/manual/reference/operator/#comparison).\n\n```coffee-script\n# many to many between chats and users\nrelcache.set \"user._id\", 5, {loginCount: 11}\nrelcache.set \"user._id\", 6, {loginCount: 8}\nrelcache.set \"user._id\", 7, {loginCount: 16}\nrelcache.set \"user._id\", 8, {loginCount: 11}\nrelcache.set \"user._id\", 9, {loginCount: 4}\n\nrelcache.find \"loginCount\", \"gte\", 10 # {user._id: [5, 7, 8]}\n```\n\nIf you want to store relationships between records, you'll probably want to use a many to many\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"relcache@0.1.2","dist":{"shasum":"796d43601f885657a64cc9ce67af2ad38c636e8d","tarball":"https://registry.npmjs.org/relcache/-/relcache-0.1.2.tgz","integrity":"sha512-PZZhdyY/J7qKLRfH5g69TFz1mAYKCOB/QqAR3lROMoxJEZOGJubc/rXXQqIlNf3Xlp+z3KC5dFw4dzWP+oFhyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaoOEvGMNENgpfoGJEViBzDJCwc6z/9lxTKLwBJYxLwQIhAMCv8yQHWP8e3OCPpXIIEvGFlVcHvpgX1DHfToRzJ4OD"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# relcache\n\nA cache for relationships so you don't have to round trip to the DB in order to look them up.  A simpler implementation and interface than an all out graph database.\n\n## Usage\n\n```coffee-script\nrelcache.set \"userId\", 5, {accountId: 1}\nrelcache.set \"userId\", 5, {userId: 8, type: 'friend'}\n\nrelcache.get \"userId\", 5            # [{accountId: 1}, {userId: 8, type: 'friend'}]\nrelcache.get \"userId\", 5, 'friend'  # {userId: 8, type: 'friend'}\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"email":"b@tlsft.com","name":"tlsft"}],"time":{"modified":"2022-08-31T23:12:11.361Z","created":"2013-07-06T00:15:48.779Z","0.0.1":"2013-07-06T00:15:54.168Z","0.0.2":"2013-07-07T03:45:02.979Z","0.0.3":"2013-07-17T00:57:02.192Z","0.0.4":"2013-07-17T22:49:18.451Z","0.0.5":"2013-07-18T19:34:53.371Z","0.0.6":"2013-07-19T01:33:43.936Z","0.0.7":"2013-07-19T22:25:55.254Z","0.0.8":"2013-07-20T18:49:51.548Z","0.0.9":"2013-07-20T19:49:31.032Z","0.0.10":"2013-07-24T19:00:08.257Z","0.1.0":"2013-07-31T02:12:29.068Z","0.1.1":"2013-07-31T22:44:55.660Z","0.1.2":"2013-08-13T23:02:35.846Z"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"repository":{"type":"git","url":"git://github.com/TorchlightSoftware/relcache.git"}}