kian
01/24/2023, 1:28 PMehesp
01/24/2023, 1:29 PMehesp
01/24/2023, 1:34 PMHardAtWork
01/24/2023, 1:40 PMJacob Wright
01/24/2023, 4:52 PMJacob Wright
01/24/2023, 4:54 PMHardAtWork
01/24/2023, 4:54 PMJacob Wright
01/24/2023, 4:54 PMJacob Wright
01/24/2023, 4:56 PMj_corea22454
01/24/2023, 4:57 PMj_corea22454
01/24/2023, 4:59 PMHardAtWork
01/24/2023, 4:59 PMj_corea22454
01/24/2023, 4:59 PMUnsmart | Tech debt
01/24/2023, 5:00 PMj_corea22454
01/24/2023, 5:21 PMjed
01/24/2023, 7:13 PMSkye
01/24/2023, 7:31 PMSkye
01/24/2023, 7:31 PMjed
01/24/2023, 8:34 PMhuw
01/25/2023, 5:38 AMLockface77
01/25/2023, 1:03 PMjavascript
async function handleRequest(request, env) {
  let id = env.COUNTER.idFromName("A");
  let obj = env.COUNTER.get(id);
  let resp = await obj.fetch(request.url);
  let count = await resp.text();
  return new Response("Durable Object 'A' count: " + count);
}HardAtWork
01/25/2023, 1:06 PMLockface77
01/25/2023, 1:07 PMLockface77
01/25/2023, 1:09 PMjavascript
// Durable Object storage is automatically cached in-memory, so reading the
// same key every request is fast. (That said, you could also store the
// value in a class member if you prefer.)Read request units    1 million, + $0.20/millionjavascript
await this.state.storage.get("value");HardAtWork
01/25/2023, 1:10 PMLockface77
01/25/2023, 1:13 PMjavascript
this.value = await this.state.storage.get("value");HardAtWork
01/25/2023, 1:16 PMLockface77
01/25/2023, 1:16 PMmartinkallstrom
01/25/2023, 3:34 PMmartinkallstrom
01/25/2023, 3:39 PM