While investigating the parts for T198701 we realized that the caching around Revision storage is quite inconsistent.
Currently the different types of cache keys used within Revision storage related classes are quite different
Class | Type of Key | Uses Domain ID? | Uses Wiki Id? | Result |
RevisionStore | makeGlobalKey | yes | no | Cache entries are shared between all wikis and divided by domain / wiki being accessed |
NameTableStore | makeKey | no | yes | There is a separate cache per site and this is divided by wiki id being accessed |
SqlBlobStore | makeKey | no | no | There is a separate cache per site, and this is not divided up by wiki being accessed at all. (Only wikiid = false access is cached) |
Note: wiki id can also be false, so entries cached using wikiId instead of DomainID have to use makeKey to ensure we don't screw up the cache
Possible actions:
- SqlBlobStore should cache access to blobs for remote wikis. In order to do this the cache key should include the wikiid
- NameTableStore & SqlBlobStore should share the same cache between all sites. makeGlobalKey should be used and an identifier of the site should be included in the cache key (for example DomainID)