robinfehr / sessionstore

Sessionstore is a node.js module for multiple databases. It can be very useful if you work with express or connect.
MIT License
54 stars 22 forks source link

every request creates a new session with tingoDb #2

Closed sharkboy1976 closed 10 years ago

sharkboy1976 commented 10 years ago

when using tingoDb as session store the session is saved in the file but with every request a new session is created. that is why i have for every request a new entry in the file.

also the code for tingodb does not work and throws an exception at application start because callback (lib/tingodb.js line:43) is undefined.

sharkboy1976 commented 10 years ago

it seems that sessions.findOne doesn't find anything and returns always null

adrai commented 10 years ago

can you try again from master?

adrai commented 10 years ago

ok, if published a new version: v0.2.7

sharkboy1976 commented 10 years ago

thx. works now as intended

sharkboy1976 commented 10 years ago

but still every request writes a new entry in the file.

adrai commented 10 years ago

i don't know how tingodb handles this in detail... perhaps calling save will always make a new entry...

sharkboy1976 commented 10 years ago

perhaps a performance issue. adding text at the end of the file is faster than editing/deleting text in the middle or beginning