[api] refactor project status calculation

make the caching based on Ids