• Dylan Griffith's avatar
    Implement recent issue autocomplete in search · 67c79757
    Dylan Griffith authored
    This adds support for autocompleting issues that were recently viewed by
    the current user when they use the search bar. This data is persisted in
    Redis sorted sets as this provides the ability to automatically expire
    the data for inactive users, keep the data sorted based on most recently
    viewed first and easily keep a limited number of items per user expiring
    the least recent ones first.
    
    The recent item tracking is partly implemented as a generic solution as
    this will quickly be followed up with merge requests and perhaps other
    features people wish to quickly navigate to. The full generic
    refactoring will happen when we implement the 2nd usage but for now the
    most important thing is to include the data type in the Redis key so
    that we don't need to migrate data when we make this generic later.
    
    This feature is behind a feature flag per user for now so we can track
    the performance implications in production.
    67c79757
issues_controller.rb 11 KB