daniel added a comment.

Note that our primary use case for usage tracking is purging the parser cache. 
So we need to track usages for every rendered version of a page that gets 
stored in the parser cache. When a page is changed or not, and what the 
revision timestamp is, is really not relevant.

So, we can add tracking entries whenever something is cached. How do we purge 
stale entries? E.g. we are tracking entries for a rendering in fr, and then the 
page is re-rendered in fr, without a new revision being created (because a 
template has changed). We can now compare the new usages for fr with the old 
usages recorded in the database. But for usage entries that aren't in the new 
rendering, we don't know if they are used by a rendering for a different 
language, e.g. de (entity_usage does not track the target language). We can 
only know that based on eu_touched: if it's larger or equal to page_touched 
(which gets updated when the page gets re-parsed), then the records are still 
needed. If touched is smaller than touched, the entries are stale, and no 
current rendering uses them.

So, as far as I can see, we can get rid of eu_touched only if we replace it 
with eu_cache_key. That would effectively mean tracking usage for each target 
language separately. That means a lot more rows in this table on multi-lingual 
projects like commons. For other projects, it would not make a difference.

I kind of like the idea of having  eu_cache_key in the table: it makes explicit 
the fact that we are tracking parser cache entries.


TASK DETAIL
  https://phabricator.wikimedia.org/T124737

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Aklapper, StudiesWorld, JanZerebecki, aude, daniel, Lydia_Pintscher, hoo, 
Wikidata-bugs, Mbch331



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to