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

flag to disable caching #17

Open
bradrydzewski opened this issue Mar 24, 2023 · 0 comments
Open

flag to disable caching #17

bradrydzewski opened this issue Mar 24, 2023 · 0 comments
Assignees

Comments

@bradrydzewski
Copy link
Member

bradrydzewski commented Mar 24, 2023

In order to disable caching, the cacheCloner should implement the Cloner interface. This makes it super simple to wrap the default cloner with caching, or without, while keeping the rest of the code the same. For example, if they implement the same interface, we can do this:

clone := cloner.NewDefault()
if nocache == false {
  clone = cloner.NewCache(clone)
}

We can then add a --no-cache flag.

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

No branches or pull requests

2 participants