Changes in XML file doesn’t reflect in HTML Page

I am creating a very small website that uses XML to store some infos in flat file (database not required). Right now everything works fine but every-time i update the XML file the changes wont reflect on page regardless of how many time i try to refresh the page or restart server. I am using “PHP XML DB” a class that makes CRUD easily possible with XML in PHP . The PHP class can be found at https://www.phpclasses.org/package/9314-PHP-Store-and-retrieve-data-records-in-XML-files.html#information.

Answer

Just found the solution, the class stores a cache after every different call and uses data from cache if the call is coming from client side, directly editing the XML file will not create a new cache therefore using the old cache.. My solution was to use an inbuilt but undocumented function to clear the cache at the end of every page call.. I fully depended on the documentation which i now realized it’s not fully documented

Leave a Reply

Your email address will not be published. Required fields are marked *