-
Notifications
You must be signed in to change notification settings - Fork 21
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
Enabling cache from UI #954
Conversation
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #954 +/- ##
==========================================
+ Coverage 85.04% 85.06% +0.02%
==========================================
Files 548 548
Lines 10055 10063 +8
Branches 2183 2186 +3
==========================================
+ Hits 8551 8560 +9
+ Misses 1444 1443 -1
Partials 60 60 ☔ View full report in Codecov by Sentry. |
const { environment } = getState().networkResources; | ||
if (environment === Environment.DEVELOPMENT && !localStorage.getItem('disableCache')) { | ||
localStorage.setItem('disableCache', 'true'); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these lines means that browser cache in the UI will always be enabled. Why are we making this change? This caching is different from the caching that is getting disabled in non-production environments in the API here: hms-dbmi-cellenics/api#511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that true? from my understanding, this localStorage.setItem('disableCache', 'true');
only stores a disableCache
flag that is used to decide whether to send the cacheUniquenessKey
to the API. No relation to the local storage in the browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you are saying is true, but because the ETag was generated from the UI, this was effectively disabling the cache in local storage, hence the relation with local storage. Now that the ETag is computed from the API and hence for every request we reach to the API to get the ETag, it is true that the local storage cache of the UI can be disabled from the API. I find it weird, because the browser cache feels like something specific to the UI, hence it should be controlled by the UI. But I think it is ok as is, your changes as they are are good, I will approve shortly
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! One Page Changed SizeThe following page changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
Signed-off-by: Pol Alvarez <[email protected]>
8f11feb
to
f76ced7
Compare
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
569.08 KB (🟡 +26 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Description
Allowing the caching to be disabled from the uI again.
Details
URL to issue
N/A
Link to staging deployment URL (or set N/A)
https://ui-ahriman-ui60-api25.scp-staging.biomage.net/
Links to any PRs or resources related to this PR
Integration test branch
master
Merge checklist
Your changes will be ready for merging after all of the steps below have been completed.
Code updates
Have best practices and ongoing refactors being observed in this PR
Manual/unit testing
Integration testing
You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.
Documentation updates
Optional