"Krinkle" changed the status of MediaWiki.r114081 to "fixme" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/114081#c32331

Old Status: new
New Status: fixme

Commit summary for MediaWiki.r114081:

adding special page with scaffolding for caching chunks of HTML

Krinkle's comment:

<pre>
+               if ( $this->cacheExpiry < 1000000000 ) {
..
+                       wfGetCache( CACHE_ANYTHING )->set( 
$this->getCacheKey(), $this->cachedChunks, $this->cacheExpiry );
</pre>
The <code>BagOStuff</code> class (of which an instance is returned via 
ObjectCache via wfGetCache) uses 86400 * 3650 (10 years) which doesn't match 
1000000000 (32 years).

This should match the <code>BagOStuff::convertExpiry</code> 
([https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/objectcache/BagOStuff.php?revision=111102&view=markup&pathrev=114081#l155
 source code]) of 86400 * 3650,  else weird edge cases will occur.

Marking FIXME for the above.


<pre>
+'cachedspecial-viewing-cached-ttl' => 'You are viewing a cached version of 
this page, which can be up to $1 old.',
+'cachedspecial-viewing-cached-ts' => 'You are viewing a cached version of this 
page, which might not be completely actual.',
 ...
+               if ( $this->cacheExpiry < 1000000000 ) {
+                       $message = $this->msg(
+                               'cachedspecial-viewing-cached-ttl',
+                               $this->getLanguage()->duration( 
$this->cacheExpiry )
+                       )->escaped();
+               }
+               else {
+                       $message = $this->msg(
+                               'cachedspecial-viewing-cached-ts'
+                       )->escaped();
+               }
</pre>

The UI can do than this. I think the user wants to know in both cases:
* how old it is (store "last modified", should be simple)
And maybe: 
* how long until the next refresh (computable in both cases I think)
* or: how often it will be refreshed
So that it says something like "cached on date X, refreshed every 30 days" and 
not "cache can be up to 30 days old". Basically matching the QueryPage type 
special pages.


Right now it is showing how it it could be (in ttl case), and nothing useful at 
all (in the ts case).

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to