Go to file
Timo Tijhof 2142be10b0 cache: Reduce responsibility of subclass and remove unused parts
* Reduce responsibility of resolve() methods to only supplying
  the resolves values.
  Moved logic for populating the cache and clearing the queue
  to the base class, and made 'lookups' private.

* The second parameter to LocalCache::add() is unused, and never passed.
  Removed to avoid confusion.

* The getTargets() method is unused. Removed.

* The getLookups() method is unused. Removed.

* The internal 'lookups' member was being used both for its keys and its
  values, but never at the same time. This seemed risky, especially in
  EchoRevisionLocalCache::resolve() where the associative array was passed
  directly to the 'where' clause of IDatabase::select(), which shouldn't
  espect keys when creating the 'IN' clause.

  Using only values would keep value types flexible, but would require
  use of the less efficient in_array().
  Keeping both keys and values and calling array_values() would work.
  Using only keys also works and is simpler, so long only ints are used.

* The tests were swapping 'targets' MapCacheLRU with a HashBagOStuff.
  Following-up 4939bff7, this was forgotten, but works because the two
  called methods (get and set) exist in both, but still seems odd.

  Fixed by using TestingAccessWrapper to act on the existing object
  instead of swapping it out.

* Improved tests by asserting more of the observed behaviour and impact.

Change-Id: I530eeac8bf3b407b8c633e0e20c7d35cc49f7a9f
2018-08-17 03:28:02 +00:00
db_patches Merge "Add a primary key to the echo_notification table" 2016-11-23 18:35:53 +00:00
i18n Localisation updates from https://translatewiki.net. 2018-08-16 22:28:36 +02:00
images Unify BetaFeatures SVG screenshot markup 2017-12-19 09:01:12 -08:00
includes cache: Reduce responsibility of subclass and remove unused parts 2018-08-17 03:28:02 +00:00
maintenance Remove [] from optional param doc 2018-08-07 08:28:28 +02:00
modules Merge "Clean up EventLogging integration" 2018-08-09 21:54:37 +00:00
scripts Use PHP's implode() with the suggested order of arguments 2018-04-16 20:21:44 +02:00
tests cache: Reduce responsibility of subclass and remove unused parts 2018-08-17 03:28:02 +00:00
.eslintrc.json build: Replace jscs/jshint with eslint 2016-11-23 15:25:59 -08:00
.gitignore Remove Ruby browser tests 2017-12-20 12:29:01 +01:00
.gitreview Whoops, track not trace 2016-10-24 17:02:28 -07:00
.mailmap Add Kunal, Moriel, Jon to credits; add mailmap file 2015-12-15 16:30:19 -08:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 21.0.0 2018-07-27 05:31:24 +00:00
.stylelintrc.json build: Update linters 2018-02-04 21:23:28 +00:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md 2017-06-07 13:25:12 +04:30
composer.json build: Updating mediawiki/mediawiki-codesniffer to 21.0.0 2018-07-27 05:31:24 +00:00
COPYING
Echo.alias.php Add special page alias for Serbian in latin variant 2018-08-15 15:49:16 +02:00
echo.sql Merge "Add a primary key to the echo_notification table" 2016-11-23 18:35:53 +00:00
extension.json Remove $wgEchoNewMsgAlert and 'echo-show-alert' preference 2018-08-12 20:25:15 -07:00
Gruntfile.js build: Extend 'svgmin' options and move to 'minify' task 2018-05-29 10:26:22 -07:00
jsduck.external.js jsduck: Remove custom @source tag 2016-09-21 00:51:46 +01:00
jsduck.json Add JSDuck support and fix errors 2016-05-11 14:07:12 -07:00
jsduck_custom_tags.rb jsduck: Remove custom @source tag 2016-09-21 00:51:46 +01:00
Makefile Remove legacy qunit handling from Echo 2016-03-31 19:09:48 +00:00
package.json Selenium: Create selenium-daily npm script 2018-07-06 14:45:09 +00:00
RELEASE_NOTES BREAKING CHANGE: Use ISO 8601 for 'ts' in cross-wiki summary. 2016-07-27 17:00:05 -04:00