Currently, checking upload limits (ExceedsUploadLimits) we are separately getting storage and segment limit from cache. We should be able to replace those two calls with single GetProjectLimits which returns all project limits (bandwidth, storage, segment). Code will be cleaner and method will execute slightly faster.
Acceptance Criteria:
update ExceedsUploadLimits to use GetProjectLimits instead GetProjectSegmentLimit and GetProjectStorageLimit separately
remove ProjectLimitCache.GetProjectSegmentLimit if its used only in ExceedsUploadLimits
check if we can also remove ProjectLimitCache.GetProjectStorageLimit if its not used in different places and remove it if possible
Currently, checking upload limits (
ExceedsUploadLimits
) we are separately getting storage and segment limit from cache. We should be able to replace those two calls with singleGetProjectLimits
which returns all project limits (bandwidth, storage, segment). Code will be cleaner and method will execute slightly faster.Acceptance Criteria:
ExceedsUploadLimits
to useGetProjectLimits
insteadGetProjectSegmentLimit
andGetProjectStorageLimit
separatelyProjectLimitCache.GetProjectSegmentLimit
if its used only inExceedsUploadLimits
ProjectLimitCache.GetProjectStorageLimit
if its not used in different places and remove it if possible