mediawiki-extensions-Echo/includes
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
..
api Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
cache cache: Reduce responsibility of subclass and remove unused parts 2018-08-17 03:28:02 +00:00
controller Add missing newlines before "use" sections 2018-08-13 09:29:32 +02:00
exception
formatters Merge "Fix missing/mismatching type hints PHPDoc tags" 2018-08-16 08:39:29 +00:00
gateway UserNotificationGateway: Use batching in markRead() and markUnread() 2018-08-09 16:34:04 -07:00
iterator Fix some doc blocks 2017-11-07 17:06:17 +01:00
jobs NotificationMapper: Use batching in deleteByUserEventOffset() 2018-08-08 14:57:58 -07:00
mapper Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
model Merge "Fix missing/mismatching type hints PHPDoc tags" 2018-08-16 08:39:29 +00:00
ooui Improve some parameter docs 2017-10-18 18:44:52 +02:00
special Merge "Fix missing/mismatching type hints PHPDoc tags" 2018-08-16 08:39:29 +00:00
AttributeManager.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
Bundleable.php Remove some non-helpful lines of documentation 2018-07-06 15:14:44 +00:00
Bundler.php build: Update mediawiki/mediawiki-codesniffer to 0.7.1 2016-12-05 15:54:30 -08:00
DataOutputFormatter.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
DeferredMarkAsDeletedUpdate.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
DiscussionParser.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
EchoArrayList.php Fix multiple PHP class declarations in one file 2018-01-21 21:17:53 +00:00
EchoCachedList.php CachedList: Use getWithSetCallback() 2018-05-30 05:15:20 +00:00
EchoContainmentList.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoContainmentSet.php Get rid of special casing for user blacklist 2018-07-09 15:50:38 -07:00
EchoDbFactory.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
EchoDiffGroup.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoDiffParser.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
EchoHooks.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
EchoOnWikiList.php Fix multiple PHP class declarations in one file 2018-01-21 21:17:53 +00:00
EchoSummaryParser.php Don't ping from user talk links in summary 2018-03-08 14:36:58 -08:00
EmailBatch.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EmailFormat.php
EmailFrequency.php
EventLogging.php Clean up EventLogging integration 2018-08-09 14:19:45 +00:00
ForeignNotifications.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
ForeignWikiRequest.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
Notifier.php Use "false" as type hint in PHPDoc tags 2018-08-13 15:31:13 +00:00
NotifUser.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
ResourceLoaderEchoImageModule.php Fix Illegal string offset 'ltr' in ResourceLoaderEchoImageModule.php 2017-03-27 23:46:45 +00:00
schemaUpdate.php Improve some parameter docs 2017-08-09 17:21:10 +02:00
SeenTime.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
UnreadWikis.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
UserLocator.php Update for the actor table change 2018-03-12 14:34:45 -04:00