You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
Description
When working in the administration we often have to fetch the same entities across multiple components or pages. Some entities like state_machine_state, state_machine_transition, maybe currency, language, locale are less likely to change over time or at least they change rarely. Such entities could be stored in and provided by a central service/provider to reduce the number of requests.
The provider could fetch these entities once when initializing or on demand.
The provider could reset/refresh anytime the page reloads.
The usage of such a provider is obviously optional, since you can "manually" fetch entities via their repositories. Manual fetching would also still be necessary when requesting specific associations.
[bonus] You could let the user configure which entities should/should not be stored that way
Example
We have a filter sidebar for the states of an order, its delivery state and its transaction state. Since these are state_machine_states with different technical_names we either have to fetch all states and filter/manage/distribute them manually in JS, or we have to send multiple requests to fetch the states of each type. Currently we are doing the latter.
When reloading the page you see the duplicated requests (blue). There are also multiple requests that fetch similar "static" entities (language, locale).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When working in the administration we often have to fetch the same entities across multiple components or pages. Some entities like
state_machine_state
,state_machine_transition
, maybecurrency
,language
,locale
are less likely to change over time or at least they change rarely. Such entities could be stored in and provided by a central service/provider to reduce the number of requests.Example
We have a filter sidebar for the states of an order, its delivery state and its transaction state. Since these are
state_machine_state
s with differenttechnical_name
s we either have to fetch all states and filter/manage/distribute them manually in JS, or we have to send multiple requests to fetch the states of each type. Currently we are doing the latter.When reloading the page you see the duplicated requests (blue). There are also multiple requests that fetch similar "static" entities (
language
,locale
).The text was updated successfully, but these errors were encountered: