• Artyom@lemm.ee
    link
    fedilink
    arrow-up
    8
    ·
    16 hours ago

    Step 1. I’m certain it’s caching

    Step 2. After evaluating all the caches, it’s definitely not caching.

    Step 3. oooohhh, it’s not ram caching, it’s file caching

    Step 4. I checked all those files, they’re definitely not caching anything unsafe.

    Step 5. Oh, it’s the other files that are caching.

  • unalivejoy@lemm.ee
    link
    fedilink
    English
    arrow-up
    56
    ·
    1 day ago

    I checked the headers. This answer is cached.

    age: 72
    cache-control: max-age=600
    x-cache: HIT
    x-cache-hits: 2
    
    • PM_Your_Nudes_Please@lemmy.world
      link
      fedilink
      arrow-up
      12
      ·
      18 hours ago

      I once had a problem that wasn’t caused by caching. It was caused by Accounts Payable forgetting to pay the internet bill, and the ISP cutting our service halfway through a network test. So the beginning of the test cached that the network had internet access, but then the end of the- wait fuck it was caused by caching

    • thejml@lemm.ee
      link
      fedilink
      English
      arrow-up
      28
      ·
      22 hours ago

      There are two hard problems in computing, naming things, cache invalidation, and off by one errors.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 hours ago

    I’m currently at the other end of this, in that I’m trying to implement caching for a build tool. And yeah, I do expect to be in for a world of pain.

    Biggest problem is that you cannot do caching correctly, unless you know all the inputs upfront. If the user decides they’ll use the CPU temperature while building their distribution artifact without telling you about it, you’re fucked.
    Or well, the user is fucked. Because their CPU temp will not update and they’ll never be told about it.

    So, the user needs to tell you about every single input, which makes it extremely verbose. I guess, that’s why so many build tools have their own custom APIs rather than using file APIs from the stdlib, because it allows you to register e.g. paths as an input, wherever they’re created…

  • lorty@lemmy.ml
    link
    fedilink
    arrow-up
    25
    ·
    24 hours ago

    I can’t be the only one who has wasted half an hour wondering why something wasn’t working before realising the response was cached.