Skip to content

cache-manager:wrap() method - support options parameter and raw return data#998

Merged
jaredwray merged 5 commits intojaredwray:mainfrom
vz-tl:feature/wrap-options-param-raw
Jan 30, 2025
Merged

cache-manager:wrap() method - support options parameter and raw return data#998
jaredwray merged 5 commits intojaredwray:mainfrom
vz-tl:feature/wrap-options-param-raw

Conversation

@vz-tl
Copy link
Contributor

@vz-tl vz-tl commented Jan 30, 2025

cache-manager: wrap() method:

  • add support for an options object parameter instead of the separate ttl and refreshThreshold params.
  • additionally a new parameter is added to the options object, that will change the method's return value to raw stored data including expiration timestamp.

Closes #997

@vz-tl
Copy link
Contributor Author

vz-tl commented Jan 30, 2025

@jaredwray , there seems to be an issue with the checks. Could you help out?

@jaredwray
Copy link
Owner

It looks like it is failing on multi-layer tests:

× wrap with multi-layer stores > should refresh according to refreshThreshold 513ms
       → expected +0 to deeply equal 1
     × wrap with multi-layer stores > should respect refreshAllStores 552ms
       → expected +0 to deeply equal 1

@vz-tl
Copy link
Contributor Author

vz-tl commented Jan 30, 2025

should be fixed now. Awaiting workflow approval

@jaredwray jaredwray merged commit 18ae742 into jaredwray:main Jan 30, 2025
3 checks passed
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.

Extend cache-manager wrap function to return raw data

2 participants