Skip to content

API Library MemCacheD

Robert Polak edited this page Aug 6, 2019 · 24 revisions

Home / API Library / MemCacheD

API Library MemCacheD handling Memory Cache based on the Enyim client. The API Library MemCacheD Methods list with Parameters, Return examples.

Configuration

Configuration - Details

Configuration of MemCacheD variables at App.config.

More details about The Server API Library Configuration at Configuration


Store_ADO

Store_ADO is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls (ADO). Returns Bool.

Method: API.MemCacheD.Store_ADO

Parameters:

Name Type Default Description
nameSpace String Name Space
procedureName String Procedure Name
inputParams Array [ADO_inputParams] Input Params Object
data dynamic data
expiresAt DateTime new DateTime(0) Expires At Date Time
validFor TimeSpan new TimeSpan(0) Valid For Time Period
repository String null Repository

ADO_inputParams - Parameter

Name Type Default Description
name string name
value dynamic value
typeName string typeName

Return: Bool


Store_BSO

Store_BSO is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of dervice calls (BSO). Returns Bool.

Method: API.MemCacheD.Store_BSO

Parameters:

Name Type Default Description
nameSpace String Name Space
className String Class Name
methodName String Method Name
inputDTO dynamic inputDTO
data T data
expiresAt DateTime new DateTime(0) Expires At Date Time
validFor TimeSpan new TimeSpan(0) Valid For Time Period
repository String null Repository

Repository constans definition at PxStat => \Resources\Constants.cs:

        C_CAS_NAVIGATION_READ = "PxStat.System.Navigation.Navigation_API.Read";
        C_CAS_NAVIGATION_SEARCH = "PxStat.System.Navigation.Navigation_API.Search";
        C_CAS_DATA_CUBE_READ_DATASET = "PxStat.Data.Cube_API.ReadDataset";
        C_CAS_DATA_COMPARE_READ_AMENDMENT = "PxStat.Data.Compare_API.ReadAmendment";
        C_CAS_DATA_COMPARE_READ_DELETION = "PxStat.Data.Compare_API.ReadDeletion";
        C_CAS_DATA_COMPARE_READ_ADDITION = "PxStat.Data.Compare_API.ReadAddition";
        C_CAS_DATA_COMPARE_READ_PREVIOUS_RELEASE = "PxStat.Data.Compare_API.ReadPreviousRelease";
        C_CAS_DATA_CUBE_READ_METADATA = "PxStat.Data.Cube_API.ReadMetadata";
        C_CAS_DATA_READ_PRE_DATASET = "PxStat.Data.Cube_API.ReadPreDataset";
        C_CAS_DATA_READ_PRE_METADATA = "PxStat.Data.Cube_API.ReadPreMetadata";
        C_CAS_DATA_CUBE_READ_COLLECTION = "PxStat.Data.Cube_API.ReadCollection";

Return: Bool

Code usage C# example:

MemCacheD.Store_BSO<dynamic>("PxStat.Data", "Cube_API", "ReadCollection", theCubeDTO, theResponse.data, new DateTime(), Resources.Constants.C_CAS_DATA_CUBE_READ_COLLECTION);

CasRepositoryFlush

Remove all the cached records stored into a Cas Repository. Returns void

Method: API.MemCacheD.CasRepositoryFlush

Parameters:

Name Type Default Description
repository String repository

Return: void

Code usage C# example:

MemCacheD.CasRepositoryFlush(Resources.Constants.C_CAS_DATA_COMPARE_READ_ADDITION + latestRelease.RlsCode);

Get_ADO

Get_ADO get in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls (ADO). Returns MemCachedD_Value.

Method: API.MemCacheD.Get_ADO

Parameters:

Name Type Default Description
nameSpace String Name Space
procedureName String Procedure Name
inputParams Array [ADO_inputParams] Input Params Object

ADO_inputParams - Parameter

Name Type Default Description
name string name
value dynamic value
typeName string typeName

Return: MemCachedD_Value Object.

MemCachedD_Value:

Name Type Default Description
datetime DateTime new DateTime.Now Date Time Now
expiresAt DateTime new DateTime(0) Expires At Date Time
validFor TimeSpan new TimeSpan(0) Valid For Time Period
hasData Bool false Has Data Indicator
data dynamic null Data

Get_BSO

Get_BSO get in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of service calls (BSO). Returns MemCachedD_Value.

Method: API.MemCacheD.Get_BSO

Parameters:

Name Type Default Description
nameSpace String Name Space
procedureName String Procedure Name
inputParams Array [ADO_inputParams] Input Params Object

ADO_inputParams - Parameter

Name Type Default Description
name string name
value dynamic value
typeName string typeName

Return: MemCachedD_Value Object.

MemCachedD_Value:

Name Type Default Description
datetime DateTime new DateTime.Now Date Time Now
expiresAt DateTime new DateTime(0) Expires At Date Time
validFor TimeSpan new TimeSpan(0) Valid For Time Period
hasData Bool false Has Data Indicator
data dynamic null Data

Code usage C# example:

MemCachedD_Value cache = MemCacheD.Get_BSO<dynamic>("PxStat.Data", "Cube_API", "ReadDataset", DTO);

Remove_ADO

Remove_ADO remove in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls (ADO). Returns Bool.

Method: API.MemCacheD.Remove_ADO

Parameters:

Name Type Default Description
nameSpace String Name Space
procedureName String Procedure Name
inputParams Array [ADO_inputParams] Input Params Object

ADO_inputParams - Parameter

Name Type Default Description
name string name
value dynamic value
typeName string typeName

Return: Bool.


Remove_BSO

Remove_BSO remove in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of service calls (BSO). Returns Bool.

Method: API.MemCacheD.Remove_BSO

Parameters:

Name Type Default Description
nameSpace String Name Space
className String Class Name
methodName String Nethod Name
inputDTO T input DTO Object

Return: Bool.

Code usage C# example:

MemCacheD.Remove_BSO<dynamic>("PxStat.Security", "Account_API", "ReadCurrentAccesss", DTO.CcnUsername);

FlushAll

FlushAll remove all in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of Data base and service calls (ADO, BSO). Returns void.

Method: API.MemCacheD.FlushAll

Parameters: N/A

Return: void.

Clone this wiki locally