balor/connect-memcached

how to set prefix

Closed this issue · 3 comments

I want to add a prefix to ensure that keys you set in memcache during the session are unique to my application.

I have tried setting it up as follows but not sure if I am doing it correctly, or how to check.

 store: new MemcachedStore({
    hosts: ['127.0.0.1:11211'],  
    prefix: prefix
 })

here is my full code below:

app.use(session({
    secret: 'CatOnKeyboard', 
    key: 'test',
    proxy: 'true',

    store   : new MemcachedStore({
        hosts: ['127.0.0.1:11211'],  
        prefix: prefix,
        secret: '123, easy as ABC. ABC, easy as 123' // Optionally use transparent encryption for memcache session data
    })
}));
balor commented

This should actually work, what is the type and value of prefix?

this was a year and a half ago - I can't remember :-S

balor commented

Ah, well, sorry for the absurdly long response time. Closing this for now but will gladly help if the prefix problem arise once again.