Skip to content

Commit

Permalink
Remove additional cache configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar committed Sep 17, 2024
1 parent 1b139be commit 55d4fde
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 35 deletions.
6 changes: 0 additions & 6 deletions ui/api/topics/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
import { filterUndefinedFromObj } from "@/utils/filterUndefinedFromObj";
import { logger } from "@/utils/logger";
import { getSession, setSession } from "@/utils/session";
import { revalidateTag } from "next/cache";

const log = logger.child({ module: "topics-api" });

Expand Down Expand Up @@ -121,9 +120,6 @@ export async function createTopic(
log.debug({ url, rawData }, "createTopic response");
const response = TopicCreateResponseSchema.parse(rawData);
log.debug(response, "createTopic response parsed");
if (validateOnly === false) {
revalidateTag("topics");
}
return response;
}

Expand Down Expand Up @@ -155,7 +151,6 @@ export async function updateTopic(
log.debug({ status: res.status }, "updateTopic response");
try {
if (res.status === 204) {
revalidateTag(`topic-${topicId}`);
return true;
} else {
const rawData = await res.json();
Expand All @@ -181,7 +176,6 @@ export async function deleteTopic(
const success = res.status === 204;
if (success) {
log.debug({ url }, "deleteTopic success");
revalidateTag("topics");
}
return success;
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { Skeleton } from "@patternfly/react-core";
import { notFound } from "next/navigation";
import { Suspense } from "react";

export const fetchCache = "force-cache";

export async function NodeBreadcrumb({
params: { kafkaId, nodeId },
}: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { NodeBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/nodes/[nodeId]/NodeBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/nodes/[nodeId]/NodeBreadcrumb";
export default NodeBreadcrumb;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { KafkaTopicParams } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/to
import { BreadcrumbLink } from "@/components/Navigation/BreadcrumbLink";
import { BreadcrumbItem } from "@/libs/patternfly/react-core";

export const fetchCache = "force-cache";

export async function TopicBreadcrumb({
params: { kafkaId, topicId },
}: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";
export default TopicBreadcrumb;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";
export default TopicBreadcrumb;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";
export default TopicBreadcrumb;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";
export default TopicBreadcrumb;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicBreadcrumb } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@activeBreadcrumb/topics/[topicId]/TopicBreadcrumb";
export default TopicBreadcrumb;
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { Skeleton } from "@patternfly/react-core";
import { notFound } from "next/navigation";
import { Suspense } from "react";

export const fetchCache = "force-cache";

export function KafkaHeader({ params: { kafkaId } }: { params: KafkaParams }) {
return (
<Suspense fallback={<AppHeader title={<Skeleton width="35%" />} />}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { Suspense } from "react";
import { useTranslations } from "next-intl";
import { ConsumerGroupActionButton } from "./ConsumerGroupActionButton";

export const fetchCache = "force-cache";

export default function Page({
params: { kafkaId, groupId },
}: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { Skeleton } from "@patternfly/react-core";
import { notFound } from "next/navigation";
import { Suspense } from "react";

export const fetchCache = "force-cache";

export async function NodeHeader({
params: { kafkaId, nodeId },
}: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { NodeHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/nodes/[nodeId]/NodeHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/nodes/[nodeId]/NodeHeader";
export default NodeHeader;
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Skeleton } from "@patternfly/react-core";
import { notFound } from "next/navigation";
import { Suspense } from "react";

export const fetchCache = "force-cache";

export default function Header({
params: { kafkaId },
}: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { KafkaHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/KafkaHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/KafkaHeader";
export default KafkaHeader;
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { Skeleton } from "@patternfly/react-core";
import { notFound } from "next/navigation";
import { ReactNode, Suspense } from "react";

export const fetchCache = "force-cache";

export function TopicHeader({
params: { kafkaId, topicId },
}: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";
export default TopicHeader;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";
export default TopicHeader;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";
export default TopicHeader;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";
export default TopicHeader;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TopicHeader } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";

export { fetchCache } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/@header/topics/[topicId]/TopicHeader";
export default TopicHeader;
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { KafkaParams } from "@/app/[locale]/(authorized)/kafka/[kafkaId]/kafka.params";
import { RedirectOnLoad } from "@/components/Navigation/RedirectOnLoad";
import { revalidatePath } from "next/cache";

export default function PostDeletePage({
params: { kafkaId },
}: {
params: KafkaParams;
}) {
revalidatePath(`/kafka/${kafkaId}/topics`, "page");
return <RedirectOnLoad url={`/kafka/${kafkaId}/topics`} />;
}

0 comments on commit 55d4fde

Please sign in to comment.