mediawiki-extensions-Echo/includes/api
Roan Kattouw 0807c3c5ad NotifUser: Refactor getNotificationCount() and friends, add caching for global counts
Previously, getNotificationCount() only looked at local notifications,
and foreign notifications were added in separately by getMessageCount()
and getAlertCount(). This didn't make any sense and resulted in
counter-intuitive things like I4d49b543.

Instead, add a $global flag to getNotificationCount(). If $global=false,
the local count is returned as before, but if $global=true, the
global count (=local+foreign) is returned. If $global is omitted,
the user's cross-wiki notification preference determines which is returned.

Update getLastUnreadNotificationCount() in the same way, since it had
the same issues.

Also add caching for global counts and timestamps, using a global
memc key.

Bug: T133623
Change-Id: If78bfc710acd91a075771b565cc99f4c302a104d
2016-05-02 16:16:57 -07:00
..
ApiEchoMarkRead.php NotifUser: Refactor getNotificationCount() and friends, add caching for global counts 2016-05-02 16:16:57 -07:00
ApiEchoMarkSeen.php API: Remove pre-1.25 compat code 2015-10-26 08:41:57 -07:00
ApiEchoNotifications.php NotifUser: Refactor getNotificationCount() and friends, add caching for global counts 2016-05-02 16:16:57 -07:00