abpframework / abpframework/abp
Change AbpLazyServiceProvider DI lifetime to IScopedDependency?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 3.7k
- Avg merge
- 15h 32m
- Merged PRs (30d)
- 106
Description
Abp AbpLazyServiceProvider has a transient dependency, which if I understand correctly means that each service injected in a request gets a new instance? Would it be better to make it scoped so that the CachedServices can be used by all services for each request? Forgive me if I have misunderstood the mechanisms of DI.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/AbpLazyServiceProvider.cs around the linked lifetime declarations, then inspect how CachedServices is used and how the dependency-injection scope behaves across services in one request. Confirm the appropriate lifetime with focused coverage; done means the request-scoped caching question has a tested resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100