Checking whether nginx cache is working

Just set up nginx caching and wondering whether it’s working properly? You can check it pretty easily:

 

curl -I URL.goes.here

That should return a bunch of information, but the important bit is:

X-Proxy-Cache: MISS

 

Well, in this case it’s not working. If it’s working you’ll see a HIT there.