kwhitley / itty-durable

Cloudflare Durable Objects + Itty Router = shorter code
MIT License
251 stars 18 forks source link

Feature: Possibility to use idFromString() in ProxyDurable, not only idFromName #21

Open sinitsa opened 2 years ago

sinitsa commented 2 years ago

It would be very convenient if we could cache somethere created object's id (via obj.toString()), for later pass it to ProxyDurable get, for minimal latency (for later we can create obj via idFromString(), and use idFromName only first time) Just needed 1) option for pass real id 2) access to obj itself not only stub ...

ps: thanks for perfect lib ;)

sinitsa commented 2 years ago

i have tried to save original Durable Namespace in the state for later using for save id to string and persist for faster load - but seems like it's wrong way with many troubles... now trying use just this lib features, and it's works well, thanks again for lib