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

Docs on Migrating to v2 from Nebulex.Adapters.Dist.Cluster #198

Closed
bernardo-martinez opened this issue Mar 15, 2023 · 5 comments
Closed

Comments

@bernardo-martinez
Copy link

Hello,

I am reading the docs on migrating to v2, but i do not see any reference on how to proceed with mentioned adapter. Can you suggest something?

thanks!

@cabol
Copy link
Owner

cabol commented Mar 15, 2023

Hey! Yeah, I see it is not mentioned in the migration guide. But the adapter you want to use is Nebulex.Adapters.Partitioned (it replaces the old one Nebulex.Adapters.Dist).

@bernardo-martinez
Copy link
Author

ok i will create an MR to the docs once i finish the migration.

On the other hand, also i do not see (and not even searching in the code of previous versions) a reference to what should generation_size be updated to. I see a reference from a comment of yours that leads my to infer it refers to the cache size, so it can be updated to max_size, right?

@cabol
Copy link
Owner

cabol commented Mar 16, 2023

Right, as you may have seen maybe, the Nebulex.Adapters.Partitioned uses a local backend adapter, which by default is Nebulex.Adapters.Local, so yes, you can configure the max cache size with the option :max_size, you will find it in the docs. A configuration example may look like this:

config :my_app, MyApp.PartitionedCache,
  primary: [
    gc_interval: :timer.hours(12),
    max_size: 1_000_000,
    allocated_memory: 2_000_000_000 # In case you want to set a memory limit too
  ]

Let me know if that helps, stay tuned, thanks!

@bernardo-martinez
Copy link
Author

Hey, regarding this, the ttl unit option (of set/put) was moved from seconds to miliseconds, right?

@cabol
Copy link
Owner

cabol commented Nov 13, 2023

Correct, the ttl is in milliseconds.

@cabol cabol closed this as completed Dec 7, 2023
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