Issue:Caching
Description: | DPL Pages Load Slowly |
Extension / Version: | DPL / ? |
Type / Status: | Change Request / open |
Problem
Would like a way to Cache Pages. I was thinking a Bot that runs the DPL query and would write the static result to the Actual Article. Then you could schedule the bot to refresh the Pages as often as necessary.
I am adding this as a Feature request. I am not smart enough to write the bot.
postjl@milwaukee.k12.wi.us
Reply
Yes. This would be a really useful enhancement and I have thought about this several times. But I never found time to develop that feature. The point is, however, that your article might look quite ugly if the output of a DPL query were contained as wiki text. The best thing would be to have the expanded DPL query(queries) for an article in a page with identical name but in a separate namespace. Then DPL could look for that page, check its date (maybe even update it ad-hoc if it were expired) and include the result, possibly with a small note that the content was taken from a cache.
I would be willing to support someone with ideas and advicer on the DPL source code if you could find someone to do the programming.
I am especially excited about this as it might make it possible to use DPL on really large sites like wikipedia...
Gero 16:58, 1 July 2008 (CEST)
Hmm..I think something like this already works (but with the downside of DPL query output showing in wiki text):
Suppose you want ArticleA to show cached results of {{#dpl:category=baz|someparam={{sometemplate}}}}.
Create Template:QueryA with this content: {{subst<includeonly></includeonly>:#dpl:category=baz|someparam={{subst<includeonly></includeonly>:sometemplate}}}}.
Whenever you want to update, write {{subst:QueryA}} into ArticleA.
--Rezyk 20:48, 3 July 2008 (CEST)
Also..I am presuming that "allowcachedresults=true" does not suit your purposes for some reason (either the pages used get updated too often, constantly outdating the automatic cache...or you want updates that will pick up newly categorized pages). If you haven't considered that option already, it should be tried. --Rezyk 20:59, 3 July 2008 (CEST)
ReReply
I would like to add my voice to this feature request, that would really change things for DPL. I'm currently moving all the data on my website and basically all the content of the website will rely on DPL and caching will be totally necessary. The allowcachedresults is unfortunately a little bit too slow to update. I may start to look at it but it will likely result in very dirty code. What are you thinking about ? creating new tables in the SQL database and storing the final output in these, only modifying when we detect that pages of a given category are being added or removed ? --EmuWikiAdmin1 July 22nd 2008