https://bugzilla.wikimedia.org/show_bug.cgi?id=41451

--- Comment #47 from Erik Moeller <e...@wikimedia.org> 2012-11-13 07:32:07 UTC 
---
(In reply to comment #45)

> That seems reasonable, yes. It takes care of the "slashdot" problem, since
> first time visitors don't have a cookie set and get the cached default 
> language
> page. When there's a cookie set, we better not cache it at all since the cache
> hit rate would be extremely low anyways, and it would just inflate the cache.

So how would this work in practice?

Scenario A:

1) Client requests https://wikidata.org/ _without_ ULS cookies present and
without being logged in.
2) Say we get a cache MISS. Page is returned with XVO including the ULS cookie
name, and with Vary: cookie for other caches not supporting XVO.
3) Page is now cached server-side.
4) ULS is loaded client-side. It does not set any cookies because the user does
not change her default language.
5) User continues to browse as normal.
6) User gets cache HITs or MISSes as normal in the default language.

Scenario B:

1) Client requests https://wikidata.org/ with ULS cookie present due to a
previous language change via ULS.
2) We get a cache MISS because page hasn't been previously cached in variant
with ULS cookie present.
3) MediaWiki checks for ULS cookie and sends "Cache-Control: no-cache,
no-store, must-revalidate" header alongside the requested page.
4) Squid therefore does not cache the page.
5) The same is true for subsequent pageviews, including pageviews by other
users with the ULS cookie present. The user now consistently gets cache MISSes,
including from intermediate caches.

Would this approach more or less work for small wikis or am I fundamentally
misunderstanding something?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to