Enable file caching for anonymous users via mediawiki File cache#431
Enable file caching for anonymous users via mediawiki File cache#431
Conversation
|
We already have memcached for caching. Is that not working? |
I think it caches intermediate php objects. Helpful for performance, including for logged in users. For file cache, of ~rendered page objects, I enabled it, a week or two ago. There was lots of noise in the measurements, lighthouse/page speed insights. It might've improved page load speed from 1.2 to .8 range. |
SuperQ
left a comment
There was a problem hiding this comment.
Nice, thanks.
I should really clean up our monitoring/grafana.
| $wgUseFileCache = false; | ||
| $wgUseFileCache = true; | ||
| $wgFileCacheDirectory = '/var/cache/mediawiki/'; | ||
| $wgShowIPinHeader = false; |
There was a problem hiding this comment.
Manual:$wgShowIPinHeader - Removed in version: 1.27.0. Looks like adding cruft to me.
If $wgUseFileCache is enabled, setting $wgShowIPinHeader to true does not have any effect. Instead, it is automatically set to false at runtime.
Appropriate at one time.
This was @danthedaniel 's idea originally so I looked up how to do it and this is what I found. I just wanted to open the PR at the least.
This implements file caching to serve static html to anonymous users and the cache be marked fresh for 2 hours.
https://www.mediawiki.org/wiki/Manual:File_cache is what this is based on