Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create performance specific endpoint #13

Open
circlecube opened this issue Sep 6, 2023 · 0 comments
Open

Create performance specific endpoint #13

circlecube opened this issue Sep 6, 2023 · 0 comments
Assignees

Comments

@circlecube
Copy link
Member

We should have endpoints for performance data in this module so that it can manage performance values independently of the plugin settings apis.

This involves migrating the CachingController.php into this module. Then we can have the js components directly calling the endpoints for the performance module and remove it from plugins.

We should also create an endpoint for cacheLevel getting/setting. Similar to how the settings are managed in the plugins:

These can live at a new API namespace newfold-performance/v1/

We should use (or set up) a PHP filter for the data injected into the data store for the app. We can hook into that in the module and add the cacheLevel value to the data store for consumption in the app. This way we don't have to load it independently in the module and the app can be aware of it.

At a high level, it will be good to establish a pattern where modules manage their own data but also expose it to be shared by the plugin store (Likewise, the coming soon boolean should live in that module). The data can be loaded in the runtime or container or hook, but the module itself should house the business logic that manages the data. It can also expose helper methods for the plugin or other modules to access.

@circlecube circlecube self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant