Optimized cache handler #39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This pull request introduces several updates across the codebase, including dependency upgrades, enhancements to the
Cacheclass, and minor adjustments to test files for consistency. Below is a summary of the most important changes grouped by theme:Dependency Updates
mongooseto version8.16.1,switcher-clientto version4.3.0,eslintto version9.30.1, andjestto version30.0.4inpackage.json. These upgrades improve compatibility and address potential bugs.Enhancements to the
CacheClassCacheclass to use a singleton pattern with a private#instanceproperty. This ensures a single shared instance of the cache throughout the application.Cacheclass (#set,get,getAll) to use the private#instanceproperty instead of a publiccacheproperty. This improves encapsulation and data security.Test File Updates
// Given,// Test) to lowercase (// given,// test,// mock) for consistency across all test cases. This change affects multiple test files, includingclient-api.test.js,component.test.js,relay.test.js, andunit-test/client/relay.test.js. [1] [2] [3] [4]Cacheclass to use the singleton instance (Cache.getInstance()) and added assertions to validate cache initialization.These changes collectively improve the maintainability, consistency, and functionality of the codebase.