Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how Session and Cookie caching work #145

Open
PureKrome opened this issue Jun 18, 2014 · 1 comment
Open

Fix how Session and Cookie caching work #145

PureKrome opened this issue Jun 18, 2014 · 1 comment

Comments

@PureKrome
Copy link
Member

The Nancy Module has this property :

public ICache Cache { get; set; }

I do this in the Module's ctor...

Before += context =>
{
    if (Cache == null)
    {
        Cache = new SessionCache(context.Request.Session);
    }

    return null;
};

I have no idea how I can ever pass some ICache instance to the module, considering the module is auto created by the nancy framework.

In general, I think the crap shit crap I did for Cachig is wrong. Bad. crap.

This needs to be re-visited.
please.

@PureKrome PureKrome added this to the 2.0 - .NET 4.5 & Async/Await milestone Jun 18, 2014
@PureKrome
Copy link
Member Author

My previous thoughts were correct -> the ICache stuff is crap.

In the nancy bootstrapper, you can define what backstore is used for the Session. As such, I'll make a new CacheData class and store that in the Session and make sure that this class is Serializable.

PureKrome added a commit to PureKrome/SimpleAuthentication that referenced this issue Oct 10, 2014
- Referencing the NancyFX MyGet library for the latest -pre which includes updates to the INancyModule interface.
- Added a NuGet.config file to reference the MyGet api.
- Removed the ICache (fixes SimpleAuthentication#145).
- Removed the HttpClient code. Now uses the WorldDomination.HttpClient.Helpers package instead.
- Provider key is not required to be sent to the Provider. The session now stores this.
- IAuthenticationProviderCallback returns dynamic (closes SimpleAuthentication#155).
- IAuthenticationProviderCallback methods are not async (closes SimpleAuthentication#151).
@PureKrome PureKrome removed this from the 2.0 - .NET 4.5 & Async/Await milestone Oct 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants