Created
February 27, 2012 07:08
-
-
Save jimmyjacobson/1922111 to your computer and use it in GitHub Desktop.
keys.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Prefix | |
var prefix = exports.prefix = 'cinchtool'; | |
//link Keys | |
exports.link = 'link'; | |
exports.links = 'links'; | |
exports.linksId = prefix + ':ids:link'; | |
exports.linkKey = function(id) { | |
return prefix + ':link:' + id; | |
} | |
exports.linksKey = prefix + ':links'; | |
exports.linkIdToKey = function(id) { | |
return prefix + ':link:' + id + ':key'; | |
} | |
exports.linkClickCounter = function(id) { | |
return prefix + ':link:' + id + ':clicks'; | |
} | |
exports.linkCinchClickCounter = function(id) { | |
return prefix + ':link:' + id + ':clicks:mobile'; | |
} | |
exports.linkStats = function(id) { | |
return prefix + ':link:' + id + ':stats'; | |
} | |
//Customer Keys | |
exports.customerIds = prefix + ':ids:customer'; | |
exports.customerKey = function(id) { | |
return prefix + ':customer:' + id; | |
} | |
exports.customersKey = prefix + ':customers'; | |
exports.customerFoxyKey = function(foxyId) { | |
return prefix + ':customer:foxy:' + foxyId; | |
} | |
exports.customerByEmail = function(email) { | |
return prefix + ':customer:email:' + email; | |
} | |
exports.customerLinks = function(id) { | |
return prefix + ':customer:' + id + ':links'; | |
} | |
//Embedly Keys | |
exports.embedlyCache = function(hash) { | |
return prefix + ':embedly:' + hash; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment