Class MDOPreferenceCache
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Inherited Members
Namespace: SuperOffice.CRM.Cache
Assembly: SoDataBase.dll
Syntax
[CacheV2("Database", 600)]
public class MDOPreferenceCache : CacheBaseV2, IFlushableV2, IDisposable
Constructors
MDOPreferenceCache()
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Declaration
public MDOPreferenceCache()
Fields
DefaultGroupingLowerLimit
Default value for grouping list lower limit (number before list becomes flattened) in the absence of preferences
Declaration
public const int DefaultGroupingLowerLimit = 7
Field Value
Type | Description |
---|---|
int |
DefaultIsGroupingAllowed
Default value for grouping in the absence of preferences
Declaration
public const bool DefaultIsGroupingAllowed = false
Field Value
Type | Description |
---|---|
bool |
MDOSectionName
Default value for grouping in the absence of preferences
Declaration
public const string MDOSectionName = "MDOList"
Field Value
Type | Description |
---|---|
string |
ShowAssociatesInPrimaryGroupOnly
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Declaration
public const string ShowAssociatesInPrimaryGroupOnly = "ShowAssociatesInPrimaryGroupOnly"
Field Value
Type | Description |
---|---|
string |
Properties
TableNames
Gets the names of the table data that are cached in this cache. When these tables are updated the cache will be disposed so a new cache instance can take its place.
Declaration
protected override IEnumerable<string> TableNames { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Overrides
Methods
GetCurrent()
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Declaration
public static MDOPreferenceCache GetCurrent()
Returns
Type | Description |
---|---|
MDOPreferenceCache |
GetGroupingLowerLimit(string)
Get the lower limit before grouped lists collapse to flattened (though after filtering)
Declaration
public int GetGroupingLowerLimit(string listName)
Parameters
Type | Name | Description |
---|---|---|
string | listName | Name of list, case insnesitive |
Returns
Type | Description |
---|---|
int | Lower limit |
GetPreferredSortOrder(string)
Get the preferred sort order. While the interface suggests this can be per list, the current functionality is to have this is a global preference
Declaration
public MDOSortOrder GetPreferredSortOrder(string listName)
Parameters
Type | Name | Description |
---|---|---|
string | listName | Name of list, case insensitive |
Returns
Type | Description |
---|---|
MDOSortOrder | Preferred sort order |
GetShowAssociatesInPrimaryGroupOnly()
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Declaration
public bool GetShowAssociatesInPrimaryGroupOnly()
Returns
Type | Description |
---|---|
bool |
IsCacheInvalidated(string, int, PrivateSave)
Determine if cache was actually invalidated by this change - much of the traffic on the userpreference table does not affect us here
Declaration
protected override bool IsCacheInvalidated(string tableName, int primaryKey, PrivateSave save)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | |
int | primaryKey | |
PrivateSave | save |
Returns
Type | Description |
---|---|
bool |
Overrides
Remarks
This cache is invalidated if a row with section name MDOList is created or updated. It is also affected by the Sorting section, and by Functions.ShowAssociatesInPrimaryGroupOnly Preferences of this sort are never deleted (there's no UI to do that), so we do not track them in the same way we track Sentry preferences.
IsGroupingAllowed(string)
Get whether grouping is turned on for a specific list
Declaration
public bool IsGroupingAllowed(string listName)
Parameters
Type | Name | Description |
---|---|---|
string | listName | Name of list, case insensitive |
Returns
Type | Description |
---|---|
bool | True if list is grouped |
OnLoad()
Cache for the special preferences used to control MDO lists; to improve performance vs. getting those preferences every time they are needed
Declaration
protected override void OnLoad()