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

Use case for cache as an interface #8020

Closed
timrobertson100 opened this issue Sep 13, 2023 · 3 comments
Closed

Use case for cache as an interface #8020

timrobertson100 opened this issue Sep 13, 2023 · 3 comments
Labels
enhancement Feature not a bug

Comments

@timrobertson100
Copy link

Hi folks

I see the request for Cache to be an interface has been discussed before and closed since there is no real use case.

We make use of web service calls from an Apache Spark distributed processing environment and front it with a cache that's backed by HBase. As we're likely to tidy this area up in our own code, it would be nice if we could do an HBaseCache implementation to pass in. Before we go down the route of Interceptors, is there any interest in Cache becoming an interface, please?

Thank you

@timrobertson100 timrobertson100 added the enhancement Feature not a bug label Sep 13, 2023
@yschimke
Copy link
Collaborator

Would passing in a different okio FileSystem work, or is that too granular? That is already supported.

@timrobertson100
Copy link
Author

Thank you very much @yschimke

This is more akin to an object store than an FS, so things like symlinks, creating directories, recursive listing etc wouldn't map over. Ideal to me would be a cache interface that had only the minimal init, get, put, delete (or so), with the implementor choosing how that was stored. Thank you for looking.

@yschimke
Copy link
Collaborator

You wouldn't need to implement those. I think this is our POR for different Cache storage.

See #2903 (comment)

As an example https://gist.github.com/mandrachek/5da100d508eebf57a94de81448dcadaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature not a bug
Projects
None yet
Development

No branches or pull requests

2 participants