Is there a magic word (or other markup) that can be inserted into a page to mean, "do not cache this page, recompute it every time it's hit?"
Similarly, is there a way to do this within PHP? I have written an extension (a <sql>...</sql> tag) to do SQL queries and place the results in a page, and I don't want them cached.
Thanks, DanB
--------------------- Confidentiality note The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system ---------------------
Hi. See PurgePage extensión and <purge/> tag. If you insert this tag in a page, it won't be cached.
2007/4/9, Daniel Barrett danb@vistaprint.com:
Is there a magic word (or other markup) that can be inserted into a page to mean, "do not cache this page, recompute it every time it's hit?"
Similarly, is there a way to do this within PHP? I have written an extension (a <sql>...</sql> tag) to do SQL queries and place the results in a page, and I don't want them cached.
Thanks, DanB
Confidentiality note The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Related, but slightly different:
What is the best way for an extension (MW 1.9.x+) to invalidate cached versions of a *different* page than the one currently being rendered?
In my case, my wiki's Main_Page contains an extension tag that sometimes needs to be re-rendered when source data changes. Because it's the Main_Page, I'd rather not disable caching altogether, but instead, invalidate the cached version when I know it's outdated.
Thanks,
/Maarten.
On 10/04/07, Maarten maartenvd@gmail.com wrote:
What is the best way for an extension (MW 1.9.x+) to invalidate cached versions of a *different* page than the one currently being rendered?
$main = Title::newMainPage(); $main->invalidateCache();
This just updates page.page_touched for the appropriate row, which causes existing caches to become obsolete.
Rob Church
On 09/04/07, Daniel Barrett danb@vistaprint.com wrote:
Is there a magic word (or other markup) that can be inserted into a page to mean, "do not cache this page, recompute it every time it's hit?"
Not in the core software, but there are several parser hook extensions and even custom magic words which add these...
Similarly, is there a way to do this within PHP? I have written an extension (a <sql>...</sql> tag) to do SQL queries and place the results in a page, and I don't want them cached.
Yes, call $parser->disableCache(); where $parser is the reference to the parent parser (third argument passed to the hook function).
Rob Church
Thank you Rob and others. Your answers led me to find the Extensions FAQ and lots more great information.
DanB
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org on behalf of Rob Church Sent: Mon 4/9/2007 8:54 PM To: MediaWiki announcements and site admin list Cc: Subject: Re: [Mediawiki-l] Don't cache this page
On 09/04/07, Daniel Barrett danb@vistaprint.com wrote:
Is there a magic word (or other markup) that can be inserted into a page to mean, "do not cache this page, recompute it every time it's hit?"
Not in the core software, but there are several parser hook extensions and even custom magic words which add these...
Similarly, is there a way to do this within PHP? I have written an extension (a <sql>...</sql> tag) to do SQL queries and place the results in a page, and I don't want them cached.
Yes, call $parser->disableCache(); where $parser is the reference to the parent parser (third argument passed to the hook function).
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org