Skip to content
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

[Breaking Change] Refactor Caching Logic #3

Merged
merged 12 commits into from
Mar 10, 2024
Merged

Conversation

IlicMiljan
Copy link
Owner

@IlicMiljan IlicMiljan commented Mar 9, 2024

Description of Changes

Added a Cache interface and its concrete implementation, ItemPoolCompatibleCache, to abstract the application's caching mechanism. The ItemPoolCompatibleCache utilizes a PSR-6 CacheItemPoolInterface for actual cache operations.

This new caching layer directly replaces the previous approach of injecting a CacheItemPoolInterface into the CachingObjectPropertiesReader.

How Has This Been Tested?

  • Values are correctly fetched from the cache when available, reducing unnecessary computations.
  • Cache misses trigger the computation callback as expected, with the computed values being cached for future requests.
  • TTL settings for cache entries are honored, allowing for proper management of cache lifetimes.

This refactor maintains all existing caching behaviors while providing a more flexible and maintainable caching infrastructure.

Checklist

Please confirm the following:

  • I have tested my changes and corrected any errors.
  • I have documented my changes if necessary.

@IlicMiljan IlicMiljan changed the title [Breaking] Refactor Caching Logic [Breaking Change] Refactor Caching Logic Mar 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.52%. Comparing base (e11a354) to head (a9b93ed).

Additional details and impacted files
@@             Coverage Diff              @@
##               main       #3      +/-   ##
============================================
+ Coverage     76.68%   77.52%   +0.84%     
+ Complexity       60       55       -5     
============================================
  Files            14       14              
  Lines           193      178      -15     
============================================
- Hits            148      138      -10     
+ Misses           45       40       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IlicMiljan IlicMiljan merged commit 55814cc into main Mar 10, 2024
1 check passed
@IlicMiljan IlicMiljan deleted the refactor-caching-logic branch March 10, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants