[pmwiki-users] Recipe to create random pages stopped working on pmwiki.org - caching issue?

Petko Yotov 5ko at 5ko.fr
Sun Dec 18 11:52:33 CST 2016

On 2016-12-18 13:05, StefCT wrote:
> In the section "Create new template based page with random name" within
> my recipe "Template Markup Tricks" I show a way to create new PmWiki
> pages with random names (using timestamps and random numbers):
> http://www.pmwiki.org/wiki/Cookbook/TemplateMarkupTricks#RandomPageName
> However, I've noticed that this doesn't work (anymore) on 
> www.pmwiki.org
> (while it still works fine with all my own PmWiki installations).
> On pmwiki.org, whenever I reload the recipe page, I get a link to the
> same random new page and not - as intended - to a new one (using a new
> timestamp and a new random number).
> I've noticed that the issue is fixed by deleting PmWiki's cookie
> "imstime" from my browser. Therefore I guess this is due to the 
> variable
> "$EnableIMSCaching" being enabled on pmwiki.org
> (http://www.pmwiki.org/wiki/PmWiki/DebugVariables#EnableIMSCaching).
> Is this correct? In this case, I should probably add a note to my 
> recipe.

This appears correct.

You can request an unconditional page refresh (Ctrl+F5 or Ctrl+Shift+R 
or Shift+Reload button on most browsers), or open the page with another 
browser, or in incognito mode, you'll get another random number.

> Is there any way to fix this with standard PmWiki markup (without 
> making
> any changes to the server)?

No. Even if $EnableIMSCaching is not enabled in a standard, out of the 
box, installation, it is documented in sample-config.php so it is safe 
to assume it will eventually be enabled on many wikis.

Also, if any page on the website is modified between reloads, for 
example if a user does create the random page, a subsequent reload will 
no longer show the cached version. The fact that the random number is 
cached by one browser session will not prevent the functionality you 
need (creating randomly named pages).


Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades

More information about the pmwiki-users mailing list