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

CLI command added for "lb4 cache --config" #8420

Closed

Conversation

sohaibahsan007
Copy link
Contributor

@sohaibahsan007 sohaibahsan007 commented Mar 23, 2022

lb4 cache command generates the code required to add cache capabilities in a loopback 4 application. The command prompts the user for a valid datasource with kv-redis connector. It then generates a cache model, repository, and cache-strategy provider. It also updates application.ts to add CacheComponent and bind CacheStrategyProvider. It then prints a message telling the user to add some lines of code to sequence for caching to work. We cannot auto-generate this code, because sequence can vary in different implementations in many applications. So it would be difficult to add code in the right place.

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

awaissaeed530 and others added 4 commits March 23, 2022 00:20
…ation

Signed-off-by: Awais Saeed <awaissaeed530@gmail.com>
Signed-off-by: Awais Saeed <awaissaeed530@gmail.com>
Signed-off-by: Awais Saeed <awaissaeed530@gmail.com>
Signed-off-by: Awais Saeed <awais.saeed@forenax.com>
@sohaibahsan007 sohaibahsan007 changed the title Lb4 cache CLI command added for "lb4 cache --config" Mar 23, 2022
@sohaibahsan007 sohaibahsan007 marked this pull request as ready for review March 23, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current/Backlog
Development

Successfully merging this pull request may close these issues.

4 participants