https://www.mediawiki.org/wiki/Manual:File_cache
Enabled this on rationalwiki.org and the results are amazing. The site is just ridiculously fast to browse logged-out, and I'm almost looking forward to our next Reddit-dotting.
Is there any reason this is not enabled by default? (Is the possibility of dynamic templates not being re-rendered enough reason?)
- d.
Two specific cases I've encountered where it was "better" to have the file cache off:
1) If you have a caching layer above Apache (Squid, Varnish, etc...) it looks like you need to have the file cache off to send the correct cache headers in order for the higher level cache to work properly. We discovered this after recently updating to 1.19 where Squid wasn't caching pages until we turned the file cache off. In our previously running 1.14 we actually modified the MediaWiki code to permit the file cache to be on in addition to sending the correct cache headers. I don't know if this is expected MediaWiki behaviour or if we just haven't setup things properly.
2) If you're running multiple sites with different skins from the same MediaWiki. For example, running a mobile skin from the same database. If you have the file cache turned on in both then one cache entry becomes stale when the article is edited from the other site. The simple solution is to turn off the file cache on both sites. I don't know how Wikipedia's mobile site is setup and there is likely some way to have file caches working on both sites.
On 13 October 2012 18:49, David Gerard dgerard@gmail.com wrote:
https://www.mediawiki.org/wiki/Manual:File_cache
Enabled this on rationalwiki.org and the results are amazing. The site is just ridiculously fast to browse logged-out, and I'm almost looking forward to our next Reddit-dotting.
Is there any reason this is not enabled by default? (Is the possibility of dynamic templates not being re-rendered enough reason?)
- d.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 14/10/12 15:07, Dave Humphrey wrote:
Two specific cases I've encountered where it was "better" to have the file cache off:
- If you're running multiple sites with different skins from the same
MediaWiki. For example, running a mobile skin from the same database. If you have the file cache turned on in both then one cache entry becomes stale when the article is edited from the other site. The simple solution is to turn off the file cache on both sites. I don't know how Wikipedia's mobile site is setup and there is likely some way to have file caches working on both sites.
You can overcome that by:
a) Setting a different $wgRenderHashAppend (if the rendered content changes, such as the mobile skin being in a different folder, or domain and having and some pages using full paths) (you still need it without file caching)
and
b) Using a different $wgFileCacheDirectory for each of them, which you can then base on $wgRenderHashAppend, eg: $wgFileCacheDirectory = "/root/wiki_filecache/$wgDBname$wgRenderHashAppend"
Awesome...I figured there was something I was missing. Thanks!
On 14 October 2012 11:18, Platonides Platonides@gmail.com wrote:
On 14/10/12 15:07, Dave Humphrey wrote:
Two specific cases I've encountered where it was "better" to have the file cache off:
- If you're running multiple sites with different skins from the same
MediaWiki. For example, running a mobile skin from the same database. If you have the file cache turned on in both then one cache entry becomes stale when the article is edited from the other site. The simple solution is to turn off the file cache on both sites. I don't know how Wikipedia's mobile site is setup and there is likely some way to have file caches working on both sites.
You can overcome that by:
a) Setting a different $wgRenderHashAppend (if the rendered content changes, such as the mobile skin being in a different folder, or domain and having and some pages using full paths) (you still need it without file caching)
and
b) Using a different $wgFileCacheDirectory for each of them, which you can then base on $wgRenderHashAppend, eg: $wgFileCacheDirectory = "/root/wiki_filecache/$wgDBname$wgRenderHashAppend"
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org