mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
Fix user group options cache busting
This commit is contained in:
@@ -262,6 +262,7 @@ export interface GetAllUsersOptions {
|
|||||||
skip?: number
|
skip?: number
|
||||||
limit?: number
|
limit?: number
|
||||||
cacheTtlMs?: number
|
cacheTtlMs?: number
|
||||||
|
cacheKeySuffix?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AdminUsersListResponse {
|
export interface AdminUsersListResponse {
|
||||||
@@ -308,6 +309,7 @@ export const usersApi = {
|
|||||||
options.group_id ?? '',
|
options.group_id ?? '',
|
||||||
options.skip ?? '',
|
options.skip ?? '',
|
||||||
options.limit ?? '',
|
options.limit ?? '',
|
||||||
|
options.cacheKeySuffix ?? '',
|
||||||
].join(':')
|
].join(':')
|
||||||
|
|
||||||
return cachedRequest(
|
return cachedRequest(
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ async function ensureDialogUsers(): Promise<void> {
|
|||||||
|
|
||||||
dialogUsers.value = await usersStore.listAllUsers({
|
dialogUsers.value = await usersStore.listAllUsers({
|
||||||
cacheTtlMs: isSameUserVersion ? USER_OPTIONS_CACHE_TTL_MS : 0,
|
cacheTtlMs: isSameUserVersion ? USER_OPTIONS_CACHE_TTL_MS : 0,
|
||||||
|
cacheKeySuffix: isSameUserVersion ? undefined : `users-version-${props.usersVersion}`,
|
||||||
})
|
})
|
||||||
dialogUsersLoadedAt = Date.now()
|
dialogUsersLoadedAt = Date.now()
|
||||||
dialogUsersLoadedVersion = props.usersVersion
|
dialogUsersLoadedVersion = props.usersVersion
|
||||||
|
|||||||
Reference in New Issue
Block a user