I need your assistance with two problems I'm having with the api [/api/abp/application-configuration] and [/api/abp/application-localization].
1.The API are being executed multiple times As of right now, the API is called four times when I log in to the tenant, even though I understand that it is only called twice with the types fetch and xhr. When I log in to the host, the aforementioned phenomenon does not happen.
2.Can I alter the aforementioned API to increase speed?
I look forward to hearing from you shortly. I appreciate your assistance.
- ABP Framework version: v8.3.2
- UI Type: Angular
13 Answer(s)
-
0
pls confirm for me. thx
-
0
-
0
Hi,
I think this is because of the service worker https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
I appreciate your response. But I have a question: why are there so few API calls above when I log in to HOST using the same source code? However, there are a lot of calls when I login into TENANT. (https://abp.io/docs/latest/framework/architecture/multi-tenancy)
Therefore, I don't believe the service worker is to blame for the issue. Could you please check it again? Regards
-
0
-
0
-
0
Hi,
My email is shiwei.liang@volosoft.com
-
0
I have sent the information to your email. Please check it.
-
0
Hi,
I'm thinking maybe the problem is related to your code.
can you reproduce the problem in a new project?
-
0
Thanks. I will check the source code again. By the way, can you answer my second question?
2.Can I alter the aforementioned API to increase speed?
-
0
Hi,
Can I alter the aforementioned API to increase speed?
you can override controller the use response cache
- https://abp.io/docs/latest/framework/architecture/modularity/extending/customizing-application-modules-overriding-services#example-overriding-a-controller
- https://learn.microsoft.com/en-us/aspnet/core/performance/caching/middleware?view=aspnetcore-8.0
-
0
Thanks, Can you explain more clearly that the override controller you mentioned is only intended to set infor to the cache so that the next call request will use the infor in the cache, right? If I understand correctly, it only helps improve the next calls. The first call does not change anything in speed, right? I would appreciate it if you could give me specific instructions on improving the [application-configuration] and [application-localization] APIs. because I am worried that the override will cause missing information in case ABP updates that API.
-
0
Hi,
Can you explain more clearly that the override controller you mentioned is only intended to set infor to the cache so that the next call request will use the infor in the cache, right?
Yes, this is the response cache, the next call will return the last response cache directly.
I would appreciate it if you could give me specific instructions on improving the [application-configuration] and [application-localization] APIs. because I am worried that the override will cause missing information in case ABP updates that API.
I understand that, it's possible.
Actually I think you don't have to care about the performance because redundant calls don't cause performance problems; the endpoint uses a distributed cache inside
-
0
This is a post that you can just reopen.