You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling Query.EnableCache in a specification, it seems to expect more than one parameter. If you only pass in a single parameter, then a dash get appended to the key.
So Query.EnableCache("app:settings:123") results in a key of "app:settings:123-"
We manage our cache keys in a separate file so we can ensure consistency when both setting them and removing them. We don't rely on the Specification object to build the cache key for us because we want to manage that ourselves.
The issue is in the SpecificationBuildExtensions method, in the EnableCache method. Just change this line:
This is quite old code, and it needs some attention. We'll fix it in the next version.
We might add an overload that accepts a single parameter. The params will allocate a new array instance which is waste in that scenario.
When calling Query.EnableCache in a specification, it seems to expect more than one parameter. If you only pass in a single parameter, then a dash get appended to the key.
So
Query.EnableCache("app:settings:123")
results in a key of "app:settings:123-"We manage our cache keys in a separate file so we can ensure consistency when both setting them and removing them. We don't rely on the Specification object to build the cache key for us because we want to manage that ourselves.
The issue is in the SpecificationBuildExtensions method, in the EnableCache method. Just change this line:
to something like
This way a single parameter won't result in a trailing dash.
The text was updated successfully, but these errors were encountered: