C# Class ScrewTurn.Wiki.SessionCache

Implements a session data cache whose lifetime is only limited to one request.
显示文件 Open project: mono/ScrewTurnWiki

Public Methods

Method Description
ClearData ( string sessionId ) : void

Clears all cached data of a session.

GetCurrentGroups ( string sessionId ) : UserGroup[]

Gets the current groups, if any, of a session.

GetCurrentUser ( string sessionId ) : UserInfo

Gets the current user, if any, of a session.

SetCurrentGroups ( string sessionId, UserGroup groups ) : void

Sets the current groups of a session.

SetCurrentUser ( string sessionId, UserInfo user ) : void

Sets the current user of a session.

Method Details

ClearData() public static method

Clears all cached data of a session.
public static ClearData ( string sessionId ) : void
sessionId string The session ID.
return void

GetCurrentGroups() public static method

Gets the current groups, if any, of a session.
public static GetCurrentGroups ( string sessionId ) : UserGroup[]
sessionId string The session ID.
return UserGroup[]

GetCurrentUser() public static method

Gets the current user, if any, of a session.
public static GetCurrentUser ( string sessionId ) : UserInfo
sessionId string The session ID.
return UserInfo

SetCurrentGroups() public static method

Sets the current groups of a session.
public static SetCurrentGroups ( string sessionId, UserGroup groups ) : void
sessionId string The session ID.
groups UserGroup The groups.
return void

SetCurrentUser() public static method

Sets the current user of a session.
public static SetCurrentUser ( string sessionId, UserInfo user ) : void
sessionId string The session ID.
user UserInfo The user.
return void