This question about Not sure...: Asked

Page cache refresh fails from command line

refresh=on

Not sure whether my analysis is correct. The System/PageCaching documentation says that refresh from the command line can be performed by:
sudo -u www ./view /Tasks/Item12035  -refresh=cache
I tried this construction in the sandbox and nothing happens. The same topic shows up in the foswiki_cache_pages table when accessed through the web.

After some tracing and poking around I found the following in PageCache.pm
425    my $session = $Foswiki::Plugins::SESSION;
426    $isCacheable = 0 if $session->inContext('command_line');
But these statements are not executed when $value is passed to isCacheable.

Any way, I removed line 426 and now I get what I want from
sudo -u www ./view Sandbox.WebHome  -refresh=cache
  • an entry in the foswiki_cache_pages table, and
  • an entry in the TRACE saying: PageCache: Stored data
  • a blob in working/cache
Have I missed something in the configuration?

refresh=all

refresh all does not work the way I expected it to work.

I tried:
sudo -u www ./view Sandbox.WebHome  -refresh=all

I expected all topics to be cached: Ie. getting an entry in the foswiki_cache_pages table and a blob in working/cache.

I got a cleaned foswiki_cache_pages (1 entry: Sandbox) and a single blob in working/cache

The result is that all topics will be served fresh, so technically speaking the cache is refreshed. But it defeats my purpose of pre-loading the cache with the current topic contents. I can understand that the implementation will respond quickly. so is a rational implementation in the browser. But from the command line a full regeneration of all cached topics would be more to my taste?

Does such a thing exist?

-- BramVanOosterhout - 11 Jul 2020

 

QuestionForm edit

Subject Not sure...
Extension
Version Foswiki 2.1.6
Status Asked
Related Topics
Topic revision: r1 - 11 Jul 2020, BramVanOosterhout
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy