Upravit

Sdílet prostřednictvím


IPartitionManager interface

Methods

extractKey(AccountEntity)

This function should return the correct key being used to save each user's cache information to cache - given an AccountEntity Example: Your application may be partitioning the user's cache information for each user using the homeAccountId thus this function would return the homeAccountId from the provided AccountEntity

getKey()

This function should return the correct key from which to read the specific user's information from cache. Example: Your application may be partitioning the user's cache information for each user using the homeAccountId and thus this function would return the homeAccountId for the user in question

Method Details

extractKey(AccountEntity)

This function should return the correct key being used to save each user's cache information to cache - given an AccountEntity Example: Your application may be partitioning the user's cache information for each user using the homeAccountId thus this function would return the homeAccountId from the provided AccountEntity

function extractKey(accountEntity: AccountEntity): Promise<string>

Parameters

accountEntity

AccountEntity

Returns

Promise<string>

Promise

getKey()

This function should return the correct key from which to read the specific user's information from cache. Example: Your application may be partitioning the user's cache information for each user using the homeAccountId and thus this function would return the homeAccountId for the user in question

function getKey(): Promise<string>

Returns

Promise<string>

Promise