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

returnType not exposed, so can't set custom lifespan on cache items #93

Open
paullryan opened this issue Mar 11, 2018 · 1 comment
Open

Comments

@paullryan
Copy link

I'm submitting a ... (check one with "x")

[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request

Current behavior
The ReturnType model is not exposed to index.ts so can't be directly used by a calling model. Given that ReturnType comes before lifespan in CacheService.set this makes it so a user can't set the lifespan without mocking the ReturnType

Expected/desired behavior
ReturnType should be exposed and/or the lifespan definition should come before the returnType in CacheService.set so that lifespan is accessible.

Minimal reproduction of the problem with instructions
No reproduction needed as this a bug in the public api

What is the motivation / use case for changing the behavior?
Need the ability to use CacheService.set with a custom lifespan for short lived items.

Environment

  • Angular version: 5.x
  • Browser:
    N/A

  • For Tooling issues:
    N/A

  • Others:
    Note while I'm aware I can hack around this, the correct behavior would be to allow the developer access to the ReturnType model.

@fulls1z3 fulls1z3 changed the title ReturnType Not Exposed, so can't set custom lifespan on cache items. returnType not exposed, so can't set custom lifespan on cache items Jul 23, 2018
@fulls1z3
Copy link
Owner

@paullryan sorry for the delay, had busy times. feel free to fire a PR and i'll approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants