On Fri, 29 Jan 2016 00:18:32 GMT, César wrote:

Hi.

I'm starting using vibe and I'm trying to set up the RedisSessionStore but I got some troubles.

First, I couldn't connect the client to a Redis server with a url. Only if server is listening on default port (6379) can be reached 'cause vibe append the port '6179' to the connection request.

The current parameter name redis_url is actually completely misleading. I've changed it and added a new port parameter. Since it's a trivial change, I've also still squeezed it in for the upcoming release (it's in 0.7.27-rc.2). The call now looks like this: RedisSessionStore("127.0.0.1", 10, 7000). For 0.7.28 I'll try to add an actual URL parser, so that RedisSessionStore("redis://127.0.0.1:7000/10") works, too.

Furthermore, I need some tips to set the expirationTime. When I try, I've just get the error message: Error: no property 'expirationTime' for type 'vibe.http.session.SessionStore'.

This is how my code looks like. Regards.

    settings.sessionStore = new RedisSessionStore("127.0.0.1:7000", 10);
    settings.sessionStore.expirationTime = 18000;

The error message occurs because settings.sessionStore is of type SessionStore, but only RedisSessionsStore has the expirationTime property. Also, a value of type Duration is required instead of an integer. The following should work:

import core.time : days;
auto store = new RedisSessionStore("127.0.0.1", 10, 7000);
store.expirationTime = 2.days;
settings.sessionStore = store;