nic-6443 commented on PR #14055:
URL: https://github.com/apache/apisix/pull/14055#issuecomment-6312382326

   Closing this one. The benchmark in the description settles it: turning 
`open_file_cache` off makes every disk-cache HIT pay one extra `openat` + 
`fstat` + `close`, about 6 µs of worker CPU per request (roughly +15% CPU for a 
1KB cached body, +8% for 64KB). Plain proxying and memory-strategy cache hits 
are unaffected, but disk-cache hits are exactly the path people pick 
proxy-cache for, and paying that on every hit to make PURGE take effect 
immediately isn't a good trade.
   
   So the current behaviour stays: with the disk strategy, a PURGE returns 200 
and deletes the file, but a worker that already has the file's descriptor 
cached keeps serving it as a `HIT` until `open_file_cache_valid` (60s by 
default) runs out. If you need the purged content gone sooner than that, plan 
for up to a minute of stale hits after a PURGE.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to