Context switcher > Store frequently visited project/groups to the DB
This is part of the work to move the frecently visited namespaces to the backend: &11957 (closed).
-
Create the server_side_frecent_namespaces
feature flag. -
Create the projects_visits
andgroups_visits
DB tables with the following rows:-
user_id
:ID
many-to-one relation with a user. -
entity_id
:ID
many-to-one relation with a project or group. -
visited_at
:Datetime
The item's access date.
-
-
Create the Visitable
concern which exposes the necessary methods to check whether a namespace was visited recently.-
We consider that an item was "accessed" when any of its page is visited, unless a prior access was tracked less than 15 minutes ago.
-
-
Create the TrackNamespaceVisitsWorker
which is responsible for tracking users' visits to projects and groups. -
Create API endpoints which the frontend calls to track visits.
Edited by Paul Gascou-Vaillancourt