Class RolesCache
Supplies a cache layer on top of Roles
Inheritance
System.Object
RolesCache
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Common.Security
Assembly: ImageVault.Common.dll
Syntax
public static class RolesCache
Fields
CacheTimeout
Get/sets the timeout for roles cache
Declaration
public static TimeSpan CacheTimeout
Field Value
Type | Description |
---|---|
System.TimeSpan |
Methods
GetRolesForUser(String)
Wraps the System.Web.Security.Roles.GetRolesForUser(System.String) in a cache layer
Declaration
public static string[] GetRolesForUser(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username |
Returns
Type | Description |
---|---|
System.String[] |
InvalidateCache(String)
Invalidates the cache for the supplied username
Declaration
public static void InvalidateCache(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username |