StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

Option to create RedisKey from ReadOnlyMemory<byte>

Open jsbeanapps opened this issue 1 year ago • 1 comments

I'd love to have the option to create RedisKeys from ReadOnlyMemory so we don't need to allocate an extra object on the heap every time a key is created. I do understand that there could occur some challenges in an async environment, if the key is disposed before it's used, but maybe there's a solution for that?

jsbeanapps avatar Jul 14 '24 20:07 jsbeanapps

I did actually spike a prototype of this a while back (incomplete). It isn't trivial, but it isn't impossible either.

On Sun, 14 Jul 2024, 21:31 jsbeanapps, @.***> wrote:

I'd love to have the option to create RedisKeys from ReadOnlyMemory so we don't need to allocate an extra object on the heap every time a key is created. I do understand that there could occur some challenges in an async environment, if the key is disposed before it's used, but maybe there's a solution for that?

— Reply to this email directly, view it on GitHub https://github.com/StackExchange/StackExchange.Redis/issues/2758 or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEHMDBYN2JXHH3XMLGFATZMLN33BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKBRG43TIOBRHAZYFJDUPFYGLJLJONZXKZNFOZQWY5LFVIZDIMBXGU4DMNZQHCTXI4TJM5TWK4VGMNZGKYLUMU . You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

mgravell avatar Jul 14 '24 21:07 mgravell