Right now, if you call playlistType for a playlist, the type is calculated every time from scratch. It's a small calculation, but it's not uncommon in Comcast code to call this a lot.
It should be cached. The cached value should clear if the playlist is edited.
[ ] Have a private cached version of playlistType. Calls to public playlistType should check if there's a cache and return it.
[ ] The cache should probably live in PlaylistStructure since, if the playlist is edited, the cache value should clear.
[ ] Shouldn't be a unknown type anymore since we know we are a variant and therefore have rules about determination of playlistType that are always applicable.
Description
Right now, if you call
playlistType
for a playlist, the type is calculated every time from scratch. It's a small calculation, but it's not uncommon in Comcast code to call this a lot.It should be cached. The cached value should clear if the playlist is edited.
Depends on https://github.com/Comcast/mamba/issues/5
Tasks
private
cached version ofplaylistType
. Calls to publicplaylistType
should check if there's a cache and return it.PlaylistStructure
since, if the playlist is edited, the cache value should clear.unknown
type anymore since we know we are a variant and therefore have rules about determination ofplaylistType
that are always applicable.