iachat/spec/controllers
Shivam Mishra a86e236d19
feat: update cache headers for cache_keys (#7283)
Update the cache headers for cache_keys to max-age=10, private, stale-while-revalidate=300

1. The cache will be fresh for 10 seconds (max-age=10). During this time, the browser will use the cached version without checking with the server.
2. After the initial 10 seconds, the browser can continue to serve the stale cache for up to 5 minutes (stale-while-revalidate=300). During this period, it will also try to revalidate and update the cache in the background.
3. After 310 seconds in total (10 seconds fresh, 300 seconds stale), if the browser has not been able to revalidate the cache, it will attempt to fetch the fresh resource directly from the server for subsequent requests, causing potential latency equivalent to a network request.

This means that the data will be directly revalidated only every 5 mins. Other times, it will stay fresh for 10 seconds and revalidate in the background. In most cases, we won't have to rely on a cache validation check because there is a WebSocket event for revalidation, so we know if something changes.

Right now the stale-while-revalidate is 5 minutes, we can then move it to 15 minutes.

> The stale-while-revalidate header is not supported in Safari, for Safari the cache keys will only stay in memory for 10 seconds before being marked stale
2023-06-14 13:21:51 +05:30
..
api feat: update cache headers for cache_keys (#7283) 2023-06-14 13:21:51 +05:30
devise feat: Google OAuth for login & signup (#6346) 2023-02-16 11:12:02 +05:30
installation chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
microsoft Fallback name branch (#6591) 2023-03-03 12:26:59 +05:30
platform/api/v1 chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
public/api/v1 chore: API documentation updates for CSAT surveys (#7255) 2023-06-05 21:14:01 +05:30
service chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
super_admin feat: Ability to update avatars from super admin (#7264) 2023-06-09 15:32:24 +05:30
twilio chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
webhooks chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
.keep Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
android_assetlinks_spec.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller_spec.rb feat: add chatwoot instance status in superadmin (#6045) 2023-01-30 18:37:51 +05:30
apple_app_spec.rb Chore: Apple site association file for deep linking (#805) 2020-05-03 12:16:11 +05:30
dashboard_controller_spec.rb chore: Add climate-control gem for handling the test ENV vars (#3267) 2021-10-25 13:13:25 +05:30
microsoft_controller_spec.rb fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
swagger_controller_spec.rb Chore: Swagger Docs V1 (#546) 2020-02-23 12:54:29 +05:30
widget_tests_controller_spec.rb [Feature] Email collect message hooks (#331) 2020-01-09 13:06:40 +05:30
widgets_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30