Ends in:
7 DAYS
16 HRS
35 MIN
32 SEC
Ends in:
7 D
16 H
35 M
32 S
Open Closed

How may the API be made better [application-configuration] and [application-localization] #8233


User avatar
0
portx-dev created

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)
  • User Avatar
    0
    portx-dev created

    pls confirm for me. thx

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I think this is because of the service worker https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API

    you can consider disabling PWA

  • User Avatar
    0
    portx-dev created

    Hi,

    I think this is because of the service worker https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API

    you can consider disabling PWA

    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)

    This is inform on HOST

    Therefore, I don't believe the service worker is to blame for the issue. Could you please check it again? Regards

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem

  • User Avatar
    0
    portx-dev created

    Hi,

    I can't reproduce the problem

    Thanks. Oddly enough, I will provide access information to our Tenant. Can you check it for me there? If possible, I will email you the access information and ask you to respond with your IP address so I can allow access.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    My email is shiwei.liang@volosoft.com

  • User Avatar
    0
    portx-dev created

    I have sent the information to your email. Please check it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I'm thinking maybe the problem is related to your code.

    can you reproduce the problem in a new project?

  • User Avatar
    0
    portx-dev created

    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?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    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
  • User Avatar
    0
    portx-dev created

    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.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    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

  • User Avatar
    0
    portx-dev created

    This is a post that you can just reopen.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06