On 19/12/2007, Nelson A Li nli@csc.com wrote:
Hello,
My problem:
- I created a table in my wikidb and pre-populated it with some data.
This is done outside MW. 2. I then created a local extension (which implements a tag <Status>) to retrieve the data and displayed them as a html table. 3. I crated a page (XYZ) contains one statement -- <Status />. When I save the page, the table is displayed correctly. 4. There were some changes made to the table inside MySQL. When I follow a link to the XYZ page, I see the old contents of the page. 5. When I "edit" and "save" the XYZ page, then I see the updated data in the table.
My question:
- Is there a way to skip the "edit" & "save" steps and see the updated
data when I visit the XYZ page? 2. If I have no way to stop the "changing data value inside MySQL directly" behavior, how do I adapt MW to live with this condition?
Thanks to anybody for help in advance.
You would have to do something when updating the database to tell MW that the cache is no longer valid. I'm sure it's doable, but I don't know how. A quick workaround would be to make an empty template and transclude it to all pages that use the <status> tag (which can probably be done automatically by the extension), and then you just have to make a null edit to the template, rather than every page, and it should automatically update all the other pages using the job queue. (I think that's how the cache works with templates, anyway... The MW cache has always confused me.)