chore: Add cache to improve widget performance (#11163)

- Add dynamic importing for routes.
- Added caching for `campaign`, `articles` and `inbox_members` API end
points.

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
Muhsin Keloth
2025-03-25 04:34:49 +05:30
committed by GitHub
parent 07d19362d2
commit 41d6f9a200
22 changed files with 589 additions and 405 deletions

View File

@@ -59,7 +59,7 @@ describe ContactInboxBuilder do
contact: contact,
inbox: twilio_inbox
).perform
end.to raise_error(ArgumentError, 'contact phone number required')
end.to raise_error(ActionController::ParameterMissing, 'param is missing or the value is empty: contact phone number')
end
end
@@ -117,7 +117,7 @@ describe ContactInboxBuilder do
contact: contact,
inbox: twilio_inbox
).perform
end.to raise_error(ArgumentError, 'contact phone number required')
end.to raise_error(ActionController::ParameterMissing, 'param is missing or the value is empty: contact phone number')
end
end
@@ -174,7 +174,7 @@ describe ContactInboxBuilder do
contact: contact,
inbox: whatsapp_inbox
).perform
end.to raise_error(ArgumentError, 'contact phone number required')
end.to raise_error(ActionController::ParameterMissing, 'param is missing or the value is empty: contact phone number')
end
end
@@ -232,7 +232,7 @@ describe ContactInboxBuilder do
contact: contact,
inbox: sms_inbox
).perform
end.to raise_error(ArgumentError, 'contact phone number required')
end.to raise_error(ActionController::ParameterMissing, 'param is missing or the value is empty: contact phone number')
end
end
@@ -290,7 +290,7 @@ describe ContactInboxBuilder do
contact: contact,
inbox: email_inbox
).perform
end.to raise_error(ArgumentError, 'contact email required')
end.to raise_error(ActionController::ParameterMissing, 'param is missing or the value is empty: contact email')
end
end