Skip to content

Commit

Permalink
Merge pull request #15 from stacksfoundation/fix/cache
Browse files Browse the repository at this point in the history
revalidate path
  • Loading branch information
cbadawi authored Mar 9, 2024
2 parents 3b19772 + 5f76212 commit e993acd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ import MempoolSize from './components/MempoolSize';
import TxsPerBlock from './components/TxsPerBlock';
import LatestBlock from './components/LatestBlock';
import OverviewData from './components/OverviewData';
import { revalidateTag } from 'next/cache';

const getStatusData = async () => {
'use server';
const [blocks, mempool] = await Promise.all([
getBlocks(7),
getData(`${apiRoot}/extended/v1/tx/mempool/stats`),
]);
console.info(JSON.stringify({ blocks: blocks.length, mempool }));
revalidateTag('/');
return {
blocks,
mempool,
Expand Down

0 comments on commit e993acd

Please sign in to comment.