Skip to content

Add a /todos/pending_count API endpoint

Our todos API endpoint has been slow in the past: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25711.

One feature we could add is something that already exists in the application: a simple count of pending todos. (This is used for the todo icon in the top right corner.)

It is faster than a list anyway, and is cached for 20 minutes - with correct invalidation - so most of the time this API endpoint itself would only need one Redis access or one SQL query to get the response body (ignoring auth etc.)