https://discord.cloudflare.com logo
Join DiscordCommunities
Powered by
# workers-discussions
  • h

    HardAtWork

    03/20/2023, 11:29 AM
    I mean, you can tell the standard Cache to Cache Everything too
  • g

    gunnars04

    03/20/2023, 12:38 PM
    What about dynamic content, f.ex. a Reddit thread, could you cache dynamic content also using standard CF cache, if you use cache purge on the URL (you don't need CF Workers)?
  • h

    HardAtWork

    03/20/2023, 12:46 PM
    Yes. Anything can be cached(though make sure that you aren't caching sensitive user details)
  • j

    Jasper

    03/20/2023, 2:48 PM
    Regarding the cache subject, is it possible when a worker returns a 404 status, to cache that result by the edge-cache before hitting the worker again? Is there a specific header we could use to let Cloudflare cache this page + result for a while? For example, there's a
    Cache-Control
    header, will that help the cache? Or is the Worker always on top of the cache layer?
  • j

    Jasper

    03/20/2023, 2:51 PM
    Okay, so whatever I will try, the request will always hit the worker first (and counts as a succesfull request)
  • j

    Jasper

    03/20/2023, 3:02 PM
    I was wondering something else as well: we're using workers to serve widget-data for other sites. As usual, they all send OPTIONS requests per client visiting their site. Is there a good solution to allow all OPTIONS traffic before it hits the worker and allow it all? I did see
    Transform Rules
    being available where I could filter OPTIONS method and redirect the traffic to another path. Would that be the best way to achieve this?
  • r

    Richard (richicoder1)

    03/20/2023, 4:55 PM
    Has anyone experimented with doing something like SWR via a worker? Return a cached response while refreshing the cache?
  • z

    zizi

    03/20/2023, 6:04 PM
    I found one article, seems not possible currently. https://community.cloudflare.com/t/disable-request-buffering/291812
  • s

    sathoro

    03/20/2023, 6:13 PM
    thank you CF Workers team for making our product launch smooth and for allowing me to not have to worry one bit about servers ❤️ I replied to hundreds of feature requests and support inquiries but not once did I have to think about the server infrastructure. I know 123k requests isn't a lot but a lot of these requests are long running (30+ seconds)
  • h

    Habib

    03/20/2023, 7:26 PM
    "Cloudflare Worker: JSON received from web socket call caching is not working. It's returning an empty cache object" https://stackoverflow.com/questions/75794446/cloudflare-worker-json-received-from-web-socket-call-caching-is-not-working-it
  • c

    calebhailey

    03/20/2023, 11:02 PM
    I think there's a typo in the Cron Trigger docs https://github.com/cloudflare/cloudflare-docs/pull/8129 I could be wrong though; cron schedules are right up there with regular expressions for me in terms of things I have to google every single time I use them, haha. This one just stood out because it was the opposite of all the other examples. 😊
  • b

    BearT

    03/20/2023, 11:32 PM
    I am trying to implement openai's api but it didn't work since the npm package uses axios so I tried the openai-edge which is supposed to fix this but I keep getting this error
  • h

    HardAtWork

    03/20/2023, 11:43 PM
    What version of wrangler are you using?
  • b

    BearT

    03/20/2023, 11:49 PM
    just updated it, cant check version cause the version command wont work
  • c

    Chaika

    03/21/2023, 12:00 AM
    You can see your wrangler version via
    wrangler --version
  • h

    HardAtWork

    03/21/2023, 12:01 AM
    Wrangler shouldn’t be installed globally any more either, so might want to uninstall there
  • b

    BearT

    03/21/2023, 12:02 AM
    ohh, thx
  • b

    BearT

    03/21/2023, 12:02 AM
    ight imma install it locally in my project thx
  • y

    Yaniv

    03/21/2023, 7:34 AM
    Hello, I joined the waitlist of Workers Browser Rendering API beta. I wanted to know when I should be expected to receive the invitation and when does this product will be released officially ? Thanks
  • h

    HardAtWork

    03/21/2023, 8:07 AM
    &
    y
    z
    • 3
    • 3
  • s

    sathoro

    03/21/2023, 1:36 PM
    hey guys. I want to get some thoughts about an issue we am having. I have two US-based customers that are getting consistent network errors when connecting to our Worker. we use long running streaming responses and these two users are consistently running into issues every several requests or so (each request lasts 30 seconds or so and happen back to back for generating data). I haven't had any other users report a similar issue. they are both US-based but are on opposites sides of the US and connected to different data centers. the error they are getting is a network error (not an error in the worker itself) and it happens either at the start of the request or in the middle (like after streaming for 15 seconds, for example)
  • v

    Vero 🐙

    03/21/2023, 2:16 PM
    Hi @sathoro, thanks for reporting that, I’m passing this to the team
  • s

    sathoro

    03/21/2023, 2:22 PM
    thanks @Vero 🐙 , I tried upgrading the zone to Cloudflare Pro and it is possibly better now, btw. but with only two users experiencing the issue (that I know of) there isn't a ton of data to go on at least so I can't say for sure if it is "fixed" or not
  • r

    rust

    03/21/2023, 2:23 PM
    is it possible to use
    bun
    for cloudflare workers?
  • h

    HardAtWork

    03/21/2023, 2:30 PM
    To build them, yea. To deploy/test them, probably not. To run them in production, definitely not
  • s

    sathoro

    03/21/2023, 6:11 PM
    I spoke too soon, at least one of the users is still having issues 😦
  • v

    Vero 🐙

    03/21/2023, 6:38 PM
    Hi, we haven’t seen more people reporting this, but it’s probaly blocked because upgrading plan changes the IP range, it happens all the time for different ranges in different areas of the world
  • e

    Erisa | Support Engineer

    03/21/2023, 6:41 PM
    If that theory is correct, refer to here https://blog.cloudflare.com/consequences-of-ip-blocking/
  • v

    Vero 🐙

    03/21/2023, 6:44 PM
    if it recurs, please make a ticket
  • c

    calebhailey

    03/21/2023, 6:56 PM
    OK, so in March of 2023 what's everyone's goto for Cloudflare Worker state? I've been toying around with mostly stateless Workers until now. I know the immediate answers will be "it depends", so let's assume I just need r/w access to serialized Javascript objects (JSON data); what's the first thing you reach for when prototyping a new Worker? When I first looked at Cloudflare Workers it seemed like Workers KV was the thing, but now there's Durable Objects and D1 (sqlite). What's a good reference for the pros/cons of each?
1...234923502351...2509Latest