Why is the component cached? Just when new anime was added to the database after 300 seconds nothing was updated.
aired.tsx:
import { AnimeCard } from '@/components/ui/card/anime.card';
import { Scroll } from '@/components/ui/scroll';
import { Typography } from '@/components/ui/typography';
import { axiosClassic } from '@/api/interceptors';
import { IAnime } from '@/shared/types/anime.types';
export const revalidate = 300;
const title = 'Сейчас на экранах';
const default_length = 30;
interface AiredProps {
length?: number;
}
export async function Aired({ length = default_length }: AiredProps) {
if (length < 1 || length > 50) {
length = default_length;
}
const { data } = await axiosClassic.get<IAnime[]>(
`/anime?aired=true&take=${length}`
);
return (
<div className='indiana-wrapper space-y-1'>
<Typography
h4
as='h3'
>
{title}
</Typography>
<div className='indiana-list'>
<Scroll className='indiana-inner overflow-hidden'>
{data.map(item => (
<AnimeCard
key={item.id}
data={item}
/>
))}
</Scroll>
</div>
</div>
);
}