diff --git a/discovery-provider/src/api/v1/tracks.py b/discovery-provider/src/api/v1/tracks.py index e9612c9b88d..371ad069725 100644 --- a/discovery-provider/src/api/v1/tracks.py +++ b/discovery-provider/src/api/v1/tracks.py @@ -65,7 +65,7 @@ from src.queries.get_track_stream_signature import get_track_stream_signature from src.queries.get_tracks import RouteArgs, get_tracks from src.queries.get_tracks_including_unlisted import get_tracks_including_unlisted -from src.queries.get_trending import get_full_trending, get_trending +from src.queries.get_trending import get_trending from src.queries.get_trending_ids import get_trending_ids from src.queries.get_trending_tracks import TRENDING_LIMIT, TRENDING_TTL_SEC from src.queries.get_unclaimed_id import get_unclaimed_id @@ -683,7 +683,7 @@ def get(self, version): strategy = trending_strategy_factory.get_strategy( TrendingType.TRACKS, version_list[0] ) - trending_tracks = get_full_trending(request, args, strategy) + trending_tracks = get_trending(args, strategy) return success_response(trending_tracks) diff --git a/discovery-provider/src/queries/get_trending.py b/discovery-provider/src/queries/get_trending.py index 9d484aaca00..cc425c53317 100644 --- a/discovery-provider/src/queries/get_trending.py +++ b/discovery-provider/src/queries/get_trending.py @@ -39,16 +39,3 @@ def get_trending(args, strategy): tracks = get_trending_tracks(args, strategy) return list(map(extend_track, tracks)) - - -def get_full_trending(request, args, strategy): - key = get_trending_cache_key(to_dict(request.args), request.path) - - # Attempt to use the cached tracks list - if args["user_id"] is not None: - full_trending = get_trending(args, strategy) - else: - full_trending = use_redis_cache( - key, TRENDING_TTL_SEC, lambda: get_trending(args, strategy) - ) - return full_trending