fix: optimisation redis key
This commit is contained in:
parent
9116f985c4
commit
e2684e6df1
|
|
@ -5,7 +5,6 @@ import { MainLayout } from "~/components/main/MainLayout"
|
|||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { FLY_REGION } from "~/lib/env.server"
|
||||
import { useAccount } from "wagmi"
|
||||
import { EllipsisHorizontalIcon } from "@heroicons/react/20/solid"
|
||||
import { LoveIcon } from "~/components/icons/LoveIcon"
|
||||
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
|
||||
import { LaughIcon } from "~/components/icons/LaughIcon"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export const fetchGetPage = async (
|
|||
input: Parameters<typeof pageModel.getPage>[0],
|
||||
queryClient: QueryClient,
|
||||
) => {
|
||||
const key = ["getPage", input.page, input]
|
||||
const key = ["getPage", input.page]
|
||||
return await queryClient.fetchQuery(key, async () => {
|
||||
return cacheGet(key, () => pageModel.getPage(input))
|
||||
})
|
||||
|
|
@ -16,7 +16,7 @@ export const prefetchGetPagesBySite = async (
|
|||
input: Parameters<typeof pageModel.getPagesBySite>[0],
|
||||
queryClient: QueryClient,
|
||||
) => {
|
||||
const key = ["getPagesBySite", input.site, input]
|
||||
const key = ["getPagesBySite", input.site]
|
||||
await queryClient.prefetchQuery(key, async () => {
|
||||
return cacheGet(key, () => pageModel.getPagesBySite(input))
|
||||
})
|
||||
|
|
@ -26,7 +26,7 @@ export const fetchGetPagesBySite = async (
|
|||
input: Parameters<typeof pageModel.getPagesBySite>[0],
|
||||
queryClient: QueryClient,
|
||||
) => {
|
||||
const key = ["getPagesBySite", input.site, input]
|
||||
const key = ["getPagesBySite", input.site]
|
||||
return await queryClient.fetchQuery(key, async () => {
|
||||
return cacheGet(key, () => pageModel.getPagesBySite(input))
|
||||
})
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const prefetchGetSiteSubscriptions = async (
|
|||
input: Parameters<typeof siteModel.getSiteSubscriptions>[0],
|
||||
queryClient: QueryClient,
|
||||
) => {
|
||||
const key = ["getSiteSubscriptions", input]
|
||||
const key = ["getSiteSubscriptions", input.siteId]
|
||||
await queryClient.prefetchQuery(key, async () => {
|
||||
return cacheGet(key, () => siteModel.getSiteSubscriptions(input))
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue