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

Create first cache generation by default when the cache is started #21

Closed
cabol opened this issue May 11, 2018 · 0 comments
Closed

Create first cache generation by default when the cache is started #21

cabol opened this issue May 11, 2018 · 0 comments

Comments

@cabol
Copy link
Owner

cabol commented May 11, 2018

Currently, when the local cache is started, the first generation is not created by default, hence if we perform some operation in the cache, an exception is raised. To avoid this exception we have to call MyCache.new_generation() before to use the cache or set the option gc_interval in the config.

The idea is to avoid this situation by creating the first cache generation automatically when the cache is started; maybe in the Nebulex.Adapters.Local.Generation.init callback. Hence, if we don't set the option gc_interval in the config because maybe we want to create generations in a different way using other strategy, etc., at least the first generation will be created and we won't get any exception.

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

No branches or pull requests

1 participant