Skip to content

Instantly share code, notes, and snippets.

@MrMjauh
Last active June 12, 2019 11:30
Show Gist options
  • Save MrMjauh/cd48b66a3e65faa6ddcadcf8029a8e44 to your computer and use it in GitHub Desktop.
Save MrMjauh/cd48b66a3e65faa6ddcadcf8029a8e44 to your computer and use it in GitHub Desktop.
Cache Key
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