Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Custom cache #947

Closed
wants to merge 3 commits into from
Closed

Custom cache #947

wants to merge 3 commits into from

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented Sep 5, 2018

If we want to let apps. adjust cache size (or pass own implementation) we need to expose it somehow.
Recently we added Options to ObjectStorage, so instead of extending ObjectStorage structure and implement new constructors WithCache, I've moved cache under Options structure.

It's related to src-d/gitbase#440

kuba-- added 2 commits September 5, 2018 20:15
Signed-off-by: kuba-- <[email protected]>
Signed-off-by: kuba-- <[email protected]>
@mcuadros
Copy link
Contributor

mcuadros commented Sep 6, 2018

The options struct is a container of flags, is not designed to container pointer or state.

@mcuadros mcuadros closed this Sep 6, 2018
@kuba-- kuba-- deleted the custom-cache branch September 6, 2018 16:55
@mcuadros
Copy link
Contributor

mcuadros commented Sep 6, 2018

@kuba-- if you need to configure the cache, just send put in the constructor as another arg.

@ajnavarro
Copy link
Contributor

@mcuadros Is not just configure the cache, we want to have control about the instance itself, to be able to share it between several repositories or change the implementation to fit our use case, per example.

Should we send it as another constructor param?

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

Successfully merging this pull request may close these issues.

6 participants