-
Notifications
You must be signed in to change notification settings - Fork 75
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
Dangling reference on cache_evict
when using referenced keys
#215
Comments
Hey @ahovgaard!! Thanks for spotting this issue and for the very detailed information. I know the references are not being removed on the evict decorator (just the given key but not its references), but you're right, it is an issue when a referencing key is updated, like you said, we end up with dangling keys in the cache, which I agree is not desirable. Let me look into it, and will try to come back with a solution soon. |
Deleting references during GC or backtracking them can be a solution |
I've been thinking about this and the best way to address it, but there is no quick fix, and any solution has pros and cons. So, let me break down the problem and address it incrementally.
Thank you very much for all the comments, suggestions, and so on, they're very well appreciated. I'll keep you posted about the progress. |
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
I've pushed a change fixing the docs about the Also, as mentioned before, the inconsistency issue will be addressed on Nebulex v3 (https://github.com/cabol/nebulex/blob/v3.0.0-dev/lib/nebulex/caching/decorators.ex#L742-L805). |
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215)
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
- Ok/Error tuple Cache API. - Unify `all` and `get_all` into one callback `get_all`. - Remove deprecated module `Nebulex.Hook`. - Use `NimbleOptions` to define and validate cache options. - Move adapters to separate repositories. - All commands optionally support a dynamic cache as the first argument. - Deprecate `Nebulex.Adapter.Stats` in favor of `Nebulex.Adapter.Info`. - Deprecate `Nebulex.Adapter.Persistence` behaviour. - Telemetry events for cache commands out-of-box. - Rename the Telemetry metadata field from `:function_name` to `:command`. - Option `:bypass_mode` to skip the cache while running tests - Changes and improvements on Decorator API. - Fix possible inconsistencies on decorators when using references (#215) - Option `:keep_ttl` to determine whether to retain the TTL
I have observed an issue with referenced keys and dangling references on
cache_evict
. This is based on theUserAccounts
example from the docs (https://hexdocs.pm/nebulex/Nebulex.Caching.Decorators.html#cacheable/3-referenced-keys).I have a mock database implementation, like so:
And the implementation using the caching decorators:
Consider the following interaction:
In step 5, the
cache_evict
is invoked, which only specifies theid
key. From the documentation:This now leaves a dangling reference from the email
"123@example.com"
to the nonexistent ID123
.In step 7, a new record is written to the DB (say from another machine running the app) using the old ID
123
. When we read the record using that ID in step 9, the previously dangling reference from"123@example.com"
now points to the new record with the mismatched email.My expectation would be that the
cache_evict
would remove references to the deleted key, so that no dangling references would be left.In this particular scenario, I could specify
however, this is exactly what the documentation suggests shouldn't be necessary. Additionally, if the
delete_user_account/1
function received just the ID as argument, I wouldn't be able to reference theemail
in:keys
.The text was updated successfully, but these errors were encountered: