Skip to content

Instantly share code, notes, and snippets.

@Ghost141
Created May 30, 2014 15:03
Show Gist options
  • Save Ghost141/d835c4eb298eb6b14448 to your computer and use it in GitHub Desktop.
Save Ghost141/d835c4eb298eb6b14448 to your computer and use it in GitHub Desktop.
Define cache life time for get basic user profile api
exports.getBasicUserProfile = {
name: 'getBasicUserProfile',
description: 'getBasicUserProfile',
inputs: {
required: ['handle'],
optional: []
},
blockedConnectionTypes: [],
outputExample: {},
version: 'v2',
cacheLifetime: 1000 * 60 * 60 * 24,
transaction: 'read',
databases: ['informixoltp', 'topcoder_dw', 'common_oltp'],
run: function (api, connection, next) {
if (!connection.dbConnectionMap) {
api.helper.handleNoConnection(api, connection, next);
} else {
api.log('Execute getBasicUserProfile#run', 'debug');
getBasicUserProfile(api, connection.params.handle, false, connection.dbConnectionMap, connection, next);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment