iachat/spec
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
..
actions chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
assets chore: Contact import improvements (CW-1362) (#6747) 2023-04-18 00:40:55 +05:30
builders chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
channels chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
configs chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
controllers feat: update cache headers for cache_keys (#7283) 2023-06-14 13:21:51 +05:30
cypress chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
dispatchers Non blocking event dispatch (#652) 2020-03-29 19:18:30 +05:30
drops chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
enterprise feat: Add audit trail events for team (#7285) 2023-06-09 17:30:36 -07:00
factories feat: Ability to update avatars from super admin (#7264) 2023-06-09 15:32:24 +05:30
finders chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
fixtures fix: Update mail check for html_part (#7273) 2023-06-09 16:08:40 +05:30
helpers chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
integration Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
jobs feat: Contact Exports (#7258) 2023-06-13 09:18:43 +05:30
lib chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
listeners fix: Automations condition based quoted text (#7272) 2023-06-09 17:00:05 +05:30
mailboxes fix: search for nil in-reply-to messages (#7286) 2023-06-12 16:01:56 +05:30
mailers feat: Contact Exports (#7258) 2023-06-13 09:18:43 +05:30
models fix: Automations condition based quoted text (#7272) 2023-06-09 17:00:05 +05:30
policies Feature: Ability to switch between multiple accounts (#881) 2020-05-26 22:38:48 +05:30
presenters feat: improvements to priority (#6981) 2023-04-25 22:28:19 +05:30
requests/api/v1 chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
services fix: Automations condition based quoted text (#7272) 2023-06-09 17:00:05 +05:30
support chore: Contact import improvements (CW-1362) (#6747) 2023-04-18 00:40:55 +05:30
workers chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
cypress.json chore: Cypress test case for create label flow 2021-07-23 16:38:44 +05:30
rails_helper.rb chore: Upgrade to Rails 7 (#6719) 2023-05-06 10:44:52 +05:30
spec_helper.rb chore: upgrade ruby to 3.1.3 (#5555) 2023-01-24 23:55:07 +05:30
test_helper.rb Chore: Setup test coverage in codeclimate [#332] (#333) 2019-12-02 08:57:11 +05:30