I don't believe it - that works! Thank you so much - this should really improve calendar handling. Who knew it just took a single line...

Thanks again,
Yaron


On Tue, May 5, 2009 at 5:37 PM, Lane, Ryan <Ryan.Lane@ocean.navo.navy.mil> wrote:
> Guys, turning off cache for the whole page is not a solution for the
> extension - please don't kill all optimization efforts this way!
>
> Do you think there is a solution that will localize turning off the cache
or
> even better - invalidate cache on update (proper way to do this)?

> It's probably not only a question for SRF, but for all SMW
> cacheing/non-caching efforts.

There are two things in this extension that have issues with caching:

1. CSS is added to the output on render
  * this can be solved by outputting the CSS with an appropriate hook
2. The extension renders different output depending on url arguments
  * This makes the extension dynamic in a way that cannot be solved by
invalidating the page's cache on update. The parser *must* be disabled for
the entire page. Notice that I'm not suggesting the parser be disabled for
all of SRF; I'm simply suggesting disabling it for the calendar output.

Here is a patch for what I'm suggesting (see
http://www.mediawiki.org/wiki/Manual:Tag_extensions#How_do_I_disable_caching
_for_pages_using_my_extension.3F):

Index: SRF_Calendar.php
===================================================================
--- SRF_Calendar.php    (revision 50076)
+++ SRF_Calendar.php    (working copy)
@@ -149,6 +149,8 @@
       function displayCalendar($events) {
               global $wgOut, $srfgScriptPath, $wgParser, $wgRequest;

+               $wgParser->disableCache();
+
               $wgOut->addLink( array(
                       'rel' => 'stylesheet',
                       'type' => 'text/css',


V/r,

Ryan Lane

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel