[pmwiki-users] Pagelist using random argument : needed to disallow IMS caching

ABClf languefrancaise at gmail.com
Tue Dec 13 10:09:14 PST 2022


I did have tried cache=0 with no result for that special case related
to browser cache ;
I will test the « trick » for mimicing new url for every refresh
suggested by Petko.

(for the random page I'm talking about, printing out 10 articles
randomly chosen, fastcache was and still is deactivated).

Thank you for your kind replies,
Gilles.


Le mar. 13 déc. 2022 à 07:17, Petko Yotov <5ko at 5ko.fr> a écrit :
>
> Your observation is correct.
>
> When $EnableIMSCaching is set, PmWiki sends the browser the last
> modified timestamp of the file wiki.d/.lastmod (which is updated every
> time a page is saved) and instructions to allow the browser to cache the
> response.
>
> Next time the browser sends the header "if-modified-since" with the same
> timestamp, PmWiki only sends a response "Not modified, re-show cached
> page".
>
> To prevent this, indeed you can set $EnableIMSCaching = 0; in
> local/Group.Page.php.
>
> Alternatively, you can use a different URL to the page with an argument
> that is ignored by PmWiki, but for the browser it will appear a
> different page, so it will not send the "if-modified-since" header.
> Something like this:
>
>    [[{*$FullName}?st={(ftime %s)} | Refresh current page ]]
>
> I have no idea if this will work with caching recipes like FastCache.
>
> Petko
>
> On 13/12/2022 05:30, ABClf wrote:
> > Hello,
> >
> > For a pagelist showing 10 articles, randomly chosen (order=random), I
> > have had to disallow IMScaching setting (for the page only) ; if not,
> > refreshing the page would print out the same result every time it is
> > refreshed (that means that only the first access would have given the
> > expected result : in this case, I wanted to let the user to be given
> > 10 more randomized articles every time he refreshes the page).
> >
> > I first tried ?action=browse to force a refresh as well as pagelist
> > argument cache=0, with no success. Finally, disallowing IMScaching
> > seems to be the right step.
> >
> > My question is : am I right, is that the regular behaviour ?
> >
> > Thank you,
> > Gilles.
> >



More information about the pmwiki-users mailing list