In a web form, keyPrefix with a `:` does not clear cache properly.
tswaters opened this issue · 1 comments
tswaters commented
In the cache provider, when clearing cache, the message is published with
$"{InstanceUniqueId}:{type}:{data}"
And is later parsed out in ProcessMessage:
var values = redisValue.ToString().Split(':');
if (values.Length == 3 && values[0] != InstanceUniqueId) // Avoid to clear twice
{
instance.Clear(values[1], values[2], false);
}
Thing is, InstanceUniqueId includes the config value keyPrefix. If this keyPrefix includes a :
the length of the redisValue delimited by :
equates to 4, not 3.
We've fixed this locally... and I have a a fix ready for this. Will submit a pull request once I can verify the tests still pass.
krurkrit commented
I think we should concern about {data} with ":" more than keyPrefix.
Because we configure keyPrefix without ":".
But a cache key from DNN, that is sent in {data} part, may contain ':'.