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

Cache Current Topic Data #351

Closed
vexx32 opened this issue Jan 23, 2020 · 0 comments · Fixed by #355
Closed

Cache Current Topic Data #351

vexx32 opened this issue Jan 23, 2020 · 0 comments · Fixed by #355
Labels
Category-Module Pertaining to the module's functionality itself. Issue-Suggestion This should be added!

Comments

@vexx32
Copy link
Owner

vexx32 commented Jan 23, 2020

Describe "Functionality"

In #346 we modify -Contemplate to open the current koan topic in the preferred editor. The current implementation requires that we re-run Get-Karma to evaluate where the user is, meaning this switch will appear to be quite slow.

Instead, we can cache the currently completed topic information, either in the module PSM1 or in the settings file.

Context "Private or Public? What are the use cases? Parameters? Options?"

Internally, Get-Karma needs to store the current topic progress information into a module-scoped variable after it has evaluated the user's progress. This could potentially be persisted as a setting or series of settings via Set-PSKoanSetting as well, so this information isn't lost when the user restarts their PowerShell session.

Then, Show-Karma needs to reference this stored data, checking to see if it has been set. Get-Karma would only need to be invoked if this data is not currently present.

@vexx32 vexx32 added Issue-Suggestion This should be added! Category-Module Pertaining to the module's functionality itself. labels Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Module Pertaining to the module's functionality itself. Issue-Suggestion This should be added!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant