This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
[OTHER] Improved management of ISR revalidation intervals using a configuration file #7142
Labels
💻 aspect: code
undefined
✨ goal: improvement
undefined
🔢 points: 3
undefined
🏁 status: ready for dev
You can asked for this issue to be assigned (if not already assigned)
What would you like to share?
Currently, Linkfree uses Incremental Static Regeneration (ISR) for some pages,
managing the
revalidate
values for different pages becomes crucial for customization and maintainability. I propose implementing a configuration file specifically for managing ISR revalidation intervals to enhance code organisation and provide more flexibility.Benefits
revalidate
values in one place, providing a clear overview of regeneration intervals for different pages.revalidate
values from page-specific logic ensures a clear distinction between regeneration configuration and data fetching/rendering, improving code modularity.revalidate
values, enabling fetching from external sources, using environment variables, or calculating intervals based on conditions.Changes proposed
isr.js
) to storerevalidate
values for different pages.getStaticProps
function for each page and utilize the appropriaterevalidate
value from the configuration object.revalidate
intervals for each page.This enhancement will improve the management of ISR revalidation intervals, leading to a more organized codebase, easier customization, and streamlined collaboration among team members.
Additional information
Happy to work on this 👍
Thanks
The text was updated successfully, but these errors were encountered: