Cache Reserve: why are we seeing 0 reads?

Hi,

I’m currently evaluating Cache Reserve; my test is a single ~8Mb image, which is being dynamically resized by Image Resizing using the following URL format:

https://img.mytestdomain.com/cdn-cgi/image/w=1234,f=auto/img/hills.jpg

I’m then just manually requesting that a bunch of times in a browser, at various random intervals.

I then have a Cache Rule set up to make that asset eligible for Cache Reserve:

So as far as I understand it—although it’s not made very clear at all in any docs I can find—when I make the first request to that URL, Cloudflare will fetch the original from the origin, do the resize operation, and add both the original and resized versions to Cache Reserve storage; the Edge cache will then look there first for each request.

As you can see from the above, it seems like I’ve mostly set things up correctly, as the image has been stored (1 write operation).

However, despite me requesting the resized image variant hundreds of times, there is no read activity at all.

I understand that the image will be in the Edge cache for 12 hours and hence not hitting Cache Reserve—but even if I purge the base URL (https://img.mytestdomain.com/img/hills.jpg) and re-request, I see a MISS as expected, but the Read operations count still stays at 0.

Is there just a long delay before this statistic updates (I’ve seen no change in 24 hours)? Or am I just completely misunderstanding how this works?

Any help would be greatly appreciated!

Thanks,
Mark

3 days later, the Read count is now at 2. So does that mean that it’s only been read from Cache Reserve twice in the 3 day period?

I’m still having trouble understanding how this is working… can anyone help please?

Need to set edge cache or browser cache to 12 hours plus, any less and cache reserve does not cache.

I am unsure if this is how it’s suppose to work but I had the same issue and by doing this it works well I think :thinking: like I see reads and writes.

Thanks—but the Edge Cache TTL is already set to 12 hours (see my initial screenshot), and the fact that there is at least one write suggests that the content being ineligible for caching isn’t the issue.

I have been refreshing the same image every so often, and I am now seeing a read count of 8, while write count is at 2.

So it seems like this is working, and that statistic just takes a long time to update?

I think what is confusing me is that the first request for the test image after the 12 hours is up is reported as a cache miss in the headers; I would expect it not to be, as it should be cached for 30 days in Cache Reserve, even if it’s fallen out of the edge cache.

But I suppose technically it is a cache miss if we’re talking about the Edge cache, just not the persistent R2 cache.

Can anyone confirm whether I have this right please?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.