Last active
June 12, 2019 11:30
-
-
Save MrMjauh/cd48b66a3e65faa6ddcadcf8029a8e44 to your computer and use it in GitHub Desktop.
Cache Key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type CacheGroup = "USER_BANNER" | "USER_AVATAR"; | |
export interface CacheKey { | |
readonly group: CacheGroup; | |
readonly id: string; | |
} | |
export function idFromCacheKey(key: CacheKey) { | |
return key.group + "@_@" + key.group; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment