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

feature: Store cache in XDG specified cache directory #323

Closed
3 of 4 tasks
patrickpichler opened this issue Apr 24, 2023 · 0 comments · Fixed by #324 or #302
Closed
3 of 4 tasks

feature: Store cache in XDG specified cache directory #323

patrickpichler opened this issue Apr 24, 2023 · 0 comments · Fixed by #324 or #302
Assignees

Comments

@patrickpichler
Copy link
Contributor

Checklist:

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature in the #k8sgpt slack channel

Is this feature request related to a problem?

  • Yes
  • No

Describe the solution you'd like

As with the config location (solved in #235) the XDG specification specifies where to store
cache files. So instead of caching results in the user config, there should be individual files created
in the corresponding caching location of the OS (on linux this would be ~/.cache).

Benefits for the project and its users

The user config could be treated as immutable and cached files are stored in the corresponding folder the OS
specifies.

Potential drawbacks

I could not think of any drawback.

Additional context

patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 24, 2023
Instead of storing cached values in the config yaml, they are now stored
under these OS specific locations:
* Linux: `~/.cache/k8sgpt`
* MacOS: `~/Library/Caches`
* Windows: `%LocalAppData%\cache`

Additionally a `Cache` package and interface has been introduced.
Currently there are two implementations:
* Noop - Doesn't do anything
* FileBased - Stores data in files under the locations listed above

fixes k8sgpt-ai#323
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 24, 2023
Instead of storing cached values in the config yaml, they are now stored
under these OS specific locations:
* Linux: `~/.cache/k8sgpt`
* MacOS: `~/Library/Caches`
* Windows: `%LocalAppData%\cache`

Additionally a `Cache` package and interface has been introduced.
Currently there are two implementations:
* Noop - Doesn't do anything
* FileBased - Stores data in files under the locations listed above

fixes k8sgpt-ai#323

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 24, 2023
Instead of storing cached values in the config yaml, they are now stored
under these OS specific locations:
* Linux: `~/.cache/k8sgpt`
* MacOS: `~/Library/Caches`
* Windows: `%LocalAppData%\cache`

Additionally a `Cache` package and interface has been introduced.
Currently there are two implementations:
* Noop - Doesn't do anything
* FileBased - Stores data in files under the locations listed above

fixes k8sgpt-ai#323

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 24, 2023
Instead of storing cached values in the config yaml, they are now stored
under these OS specific locations:
* Linux: `~/.cache/k8sgpt`
* MacOS: `~/Library/Caches`
* Windows: `%LocalAppData%\cache`

Additionally a `Cache` package and interface has been introduced.
Currently there are two implementations:
* Noop - Doesn't do anything
* FileBased - Stores data in files under the locations listed above

fixes k8sgpt-ai#323

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
1 participant