@itd-api/cache / buildCacheKey
Function: buildCacheKey()
function buildCacheKey(route, request): string | undefined;Defined in: packages/cache/src/key.ts:46
Собирает ключ из значений, влияющих на адрес, тело или разобранный ответ.
Заголовки и транспортные опции намеренно не входят. Если тело либо опция другого плагина не сериализуются как JSON, запрос выполняется без кэша.
Parameters
route
| "auth.sessions" | "users.me" | "users.checkUsername" | "users.search" | "users.whoToFollow" | "users.topClans" | "users.followers" | "users.following" | "users.blocked" | "users.getPrivacy" | "users.pins" | "users.followStatus" | "users.get" | "posts.list" | "posts.likedByUser" | "posts.byUser" | "posts.comments" | "posts.stats" | "posts.get" | "comments.replies" | "notifications.list" | "notifications.count" | "notifications.getSettings" | "hashtags.search" | "hashtags.trending" | "hashtags.posts" | "search.all" | "files.get" | "subscription.status" | "subscription.methods" | "verification.status" | "platform.changelog" | "platform.announcements" | "platform.portal" | "platform.status"
request
RawRequestOptions
Returns
string | undefined