I have some data that needs to be displayed on each page view and can not be cashed. Workflow is like this:

  1. Page is loaded
  2. Ajax call is made to custom php script that gets information from db
  3. The script returns json object

The php script is standalone and it doesn't require Magento intilization. I could create Magento controller that would return json object, but this would be very consuming process, Magento spends 10-30Mb extra memory for each ajax call (means for each page load), with custom standalone script only 1Mb of memory is spent.

Is there any very lightweight way in Magento 2 to load model and display data by excluding some steps?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.