diego-treitos / nginx_cache_multipurge

31 stars 12 forks source link

Fix for varying key position #8

Closed iclukas closed 3 years ago

iclukas commented 4 years ago

We recently updated nginx (1.10 to 1.14, yes Debian is lagging a bit behind) and ran into a little problem. The key position in nginx’ cache files changed and broke the binary key finder. Here is a patch to find the correct key position in the first 1024 bytes of the first file and then remember that position. This should work well enough, so it’s not necessary to look for the key position in every file.