-
Notifications
You must be signed in to change notification settings - Fork 236
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
Default cache key produces clashes #491
Comments
@samstickland Thanks for reporting this! |
@yogeshjain999 also found trailblazer/trailblazer-cells#13 which is a the same bug. |
@yogeshjain999 Can't we fix this in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If there are two cells in the same namespace the same cache will be produced by default, which of course causes all sorts of problems in production.
In caching.rb we have:
https://github.com/trailblazer/cells/blob/master/lib/cell/caching.rb#L30
And in cell.rb
https://github.com/trailblazer/trailblazer-cells/blob/master/lib/trailblazer/cell.rb#L36
This means that a cells called
SomeNamespace::Cell::One
andSomeNamespace::Cell::Two
will produce the samecontroller_path
and hence the same cache key.I can't see why we simply wouldn't the class name for cache key?
Our workaround for this is currently:
etc.
I think the first code should be:
The text was updated successfully, but these errors were encountered: