Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

feat(cache-module): implemented cached modules #1094

Merged
merged 5 commits into from
Sep 11, 2023

Conversation

bishnubista
Copy link
Contributor

@bishnubista bishnubista commented Aug 21, 2023

Cache CDN modules on startup.

Description

Motivation and Context

This feature helps to cache CDN modules in users machine. It helps to start application faster locally.

How Has This Been Tested?

Yes, running one app locally providing module map.
NODE_ENV=development npm start -- --module-map-url=<your-remote-module-map-url> --root-module-name=<your-root-module-name>
First run will create a .one-app folder and .one-app-module-cache file..one-app-module-cache stores module data. Subsequent run will first look on cache file before making api call.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update
  • Security update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • Performance tests should be ran against the server prior to merging.
  • This change impacts caching for client browsers.
  • This change impacts HTTP headers.
  • This change adds additional environment variable requirements for One App users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using One App?

One app start time will be faster.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 21, 2023

Size Change: 0 B

Total Size: 688 kB

ℹ️ View Unchanged
Filename Size
./build/app/app.js 164 kB
./build/app/app~vendors.js 389 kB
./build/app/runtime.js 7.07 kB
./build/app/service-worker-client.js 7.25 kB
./build/app/vendors.js 121 kB

compressed-size-action

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this file be renamed to cdnCache

src/server/utils/cacheCDNModules.js Outdated Show resolved Hide resolved
src/server/utils/cacheCDNModules.js Outdated Show resolved Hide resolved
src/server/utils/cacheCDNModules.js Outdated Show resolved Hide resolved
@Matthew-Mallimo Matthew-Mallimo requested a review from a team August 30, 2023 12:55
@Matthew-Mallimo Matthew-Mallimo requested a review from a team September 7, 2023 14:04
@Matthew-Mallimo Matthew-Mallimo merged commit 84838a8 into main Sep 11, 2023
9 checks passed
@Matthew-Mallimo Matthew-Mallimo deleted the feat/cache-modules branch September 11, 2023 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants