Does MemoryCache GetKeysByPattern behave differently than Redis?

Keys:
1:2:3
1:3:4
1:2:41

Search By Pattern “1:*:4”

Memory Cache returns last two. That is unexpected because if you do redis KEYS you get only the second one.

Should memory cache append a “+$” to regex?

GetKeysByPattern uses ScanAllKeys which uses Redis’s SCAN command.