i don't have the code yet but i'm workin out what i think is the same thing.
I figure so far that i need to
create a dynamic menu :- menu.php
create a static menu :- menu_static.php
create an array page for static menu :- menu_array.php
now i reckon that i need to put a function in my main page that will compare the current date with the last modified date of menu_array.php.
If it's longer than say 5 days then use menu.php
In menu.php is a function that takes the arrays and writes them to menu_array.php
The next time a user comes, the code logic will see that it hasn't been 5 days and serve menu_static.php
that's my idea so far, i haven't finished it yet but when i get further I'll post the code.
That's if someone already hasn't found it o' course😉