node.js エクスプレス セッションを Azure キャッシュに保存しようとしています。
この記事http://blogs.msdn.com/b/silverlining/archive/2013/01/03/november-updates-to-windows-azure-powershell-cmdletsに従って、worker ロールに専用のキャッシュを既に設定しています。 aspx
Add-AzureCacheWorkerRole mycacherole
Enable-AzureMemcacheRole mywebrole mycacherole
サンプルでは、mc モジュールを使用しています。
そのモジュールを使用して Azure キャッシュにエクスプレス セッションを保存する方法を教えてください。
AzureCache としてconnect-memcached https://github.com/balor/connect-memcachedも試しました。
MemcachedStore = require('connect-memcached')(express);
app.use(express.session({
secret: 'CatOnTheKeyboard',
store: new MemcachedStore
}));
このトレースでエラーが発生しました。Express でセッションを azureCache に保存することは可能ですか? お手伝いありがとうございます。
TypeError: Cannot call method 'reverse' of null
at Client.connect
(E:\approot\node_modules\connect-memcached\node_modules\memcached\lib\memcached.js:129:42)
at Client.memcachedCommand [as command]
(E:\approot\node_modules\connect-memcached\node_modules\memcached\lib\memcached.js:299:10)
at Client.get
(E:\approot\node_modules\connect-memcached\node_modules\memcached\lib\memcached.js:794:10)
at MemcachedStore.get
(E:\approot\node_modules\connect-memcached\lib\connect-memcached.js:82:19)
at Object.session [as handle]
(E:\approot\node_modules\connect\lib\middleware\session.js:309:11)
at next (E:\approot\node_modules\connect\lib\proto.js:190:15)
at Object.cookieParser [as handle]
(E:\approot\node_modules\connect\lib\middleware\cookieParser.js:60:5)
at next (E:\approot\node_modules\connect\lib\proto.js:190:15)
at Object.handle
(E:\approot\node_modules\express-validator\lib\express_validator.js:148:10)
at next (E:\approot\node_modules\connect\lib\proto.js:190:15)