On my own wiki, my caching system is pretty simple - when the page refreshes, it checks the links to make sure they are valid and applies the correct formatting / location for those that don’t. The cache page is saved as an HTML page in my cache root.
Pages marked as "not created" during page refresh are inserted into the database table that contains the page, and then to the csv of the pages that link to it.
When someone creates this page, he initiates a scan to view each link page and re-cache the link page with the correct link and formatting.
If you were not interested in highlighting pages that were not created, however, you can simply check if the page was created while trying to access it - and if not redirected to the creation page. Then simply link to the pages as usual in other articles.
source share