@devcycle/nextjs-sdk
Version:
The Next.js SDK for DevCycle!
14 lines • 486 B
JavaScript
'use server';
import { revalidateTag } from 'next/cache';
export const invalidateConfig = async (sdkToken, userId) => {
if (typeof window != 'undefined') {
console.error('DevCycle realtime updates are only available in Next.js 14.0.5 and above. Please update your version ' +
'or disable realtime updates.');
return;
}
revalidateTag(sdkToken);
if (userId) {
revalidateTag(userId);
}
};
//# sourceMappingURL=invalidateConfig.js.map