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

Implement dummy functions to avoid dummy warnings. #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crova
Copy link

@crova crova commented Sep 18, 2023

Hello, how is it going?
First of all, thanks for the great work.

We recently integrated your library into our application using ConCache as adapter.
The following configuration:

  @ttl :timer.minutes(15)

  use Cache,
    name: :apollo_io,
    adapter: Cache.ConCache,
    sandbox?: Mix.env() === :test,
    opts: [dirty?: false, global_ttl: @ttl]

Yields the following warnings when using Sandbox during tests:

warning: Cache.Sandbox.dirty_get_or_store/3 is undefined or private
  lib/enaia/apollo_io/cache_forwarder.ex:15

warning: Cache.Sandbox.get_or_store/4 is undefined or private
  lib/enaia/apollo_io/cache_forwarder.ex:15

This PR implement some dummy functions to silence those warnings.

Please let me know if you see any issues.

Cheers.

@MikaAK
Copy link
Owner

MikaAK commented Sep 21, 2023

Thanks for this, I think a good solution would be to just implement those two functions however 🤔 I think it should be just a quick call in the Agent, what do you think? That way you get to be able to test with those functions as well 😄

@crova
Copy link
Author

crova commented Sep 21, 2023

Thanks for this, I think a good solution would be to just implement those two functions however 🤔 I think it should be just a quick call in the Agent, what do you think? That way you get to be able to test with those functions as well 😄

I definitely went for the lazy solution.
I'll give it a try to see if I can implement those and improve this PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants