Page MenuHomePhabricator

Store Enriched Objects in Memcached
Open, MediumPublic

Description

Description

Often, it's possible to have information about an object stored in memcached. Some of this object is stored in ZWrappers but is lost when we create a ZWrapper from things retrieved from memcached. This information could be used to rehydrate ZWrappers with more information.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

We could store any/all of the following in memcached:

  • object is already validated;
  • object is already fully resolved;
  • (for Wikidata) certain statements are not yet populated

Remove all the non-applicable tags from the "Tags" field, leave only the tags of the projects/repositories related to this task


Completion checklist

Related Objects

Event Timeline

  • (for Wikidata) certain statements are not yet populated

Should we store the fetch booleans (wikidataImport's qualifiers and references) for these? Or is this for the "only get me things in French" / etc.? Or both?

Hi @Jdforrester-WMF - Thanks for raising this. I doubt if it's worthwhile to write code to store and check (in memcached) the fetch Booleans for qualifiers and references. I doubt if we will ever switch off the Boolean for qualifiers, and it's likely that after we turn on references, it will also continue to stay on forever. When we do turn on references, I wonder if we could just run a script that removes all stored Wikidata entities from the cache. I'll think some more about this.

Regarding the "optimization parameters" (which entity parts, languages, and statement properties were fetched), It won't be necessary to record those in memcached, because those will be baked into the key under which the first entity is stored.

We will need to re-file this under Q3's performance epic.