Skip to content

Commit

Permalink
remove unused getCacheType
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerag committed Jun 9, 2020
1 parent 9fc217f commit 6088a2f
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions src/unifiedCache/utils/CacheHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class CacheHelper {
* @param homeAccountId
* @param environment
*/
static generateAccountIdForCacheKey(
private static generateAccountIdForCacheKey(
homeAccountId: string,
environment: string
): string {
Expand All @@ -205,7 +205,7 @@ export class CacheHelper {
* @param clientId
* @param familyId
*/
static generateCredentialIdForCacheKey(
private static generateCredentialIdForCacheKey(
credentialType: CredentialType,
clientId: string,
realm?: string,
Expand All @@ -227,7 +227,7 @@ export class CacheHelper {
/**
* Generate target key component as per schema: <target>
*/
static generateTargetForCacheKey(scopes: string): string {
private static generateTargetForCacheKey(scopes: string): string {
return (scopes || "").toLowerCase();
}

Expand Down Expand Up @@ -256,31 +256,4 @@ export class CacheHelper {

return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();
}

/**
* helper function to return `CacheSchemaType`
* @param key
*/
static getCacheType(type: number): string {
switch (type) {
case CacheType.ADFS:
case CacheType.MSA:
case CacheType.MSSTS:
case CacheType.GENERIC:
return CacheSchemaType.ACCOUNT;

case CacheType.ACCESS_TOKEN:
case CacheType.REFRESH_TOKEN:
case CacheType.ID_TOKEN:
return CacheSchemaType.CREDENTIAL;

case CacheType.APP_META_DATA:
return CacheSchemaType.APP_META_DATA;

default: {
console.log("Invalid cache type");
return null;
}
}
}
}

0 comments on commit 6088a2f

Please sign in to comment.