

@classmethod
@serialized
def _cached(cls, session, sp_playlist, add_ref=True):
    '\n        Get :class:`Playlist` instance for the given ``sp_playlist``. If\n        it already exists, it is retrieved from cache.\n\n        Internal method.\n        '
    if (sp_playlist in session._cache):
        return sp_playlist._cache[sp_playlist]
    playlist = Playlist(session, sp_playlist=sp_playlist, add_ref=add_ref)
    session._cache[sp_playlist] = playlist
    return playlist

dataset/ETHPy150Open mopidy/pyspotify/spotify/playlist.py Playlist._cached/VarMisuse@38/104 `session`->`sp_playlist`