#cache
9 one-liners with this tag.
All one-liners tagged cache
Check if LiteSpeed Cache serves a page from cache
$curl -s -o /dev/null -D - https://example.com/ | grep -iE "^(server|x-litespeed-cache[a-z-]*):"
Check the browser caching headers of a file
$curl -sI https://example.com/wp-includes/css/dist/block-library/style.min.css | grep -iE "^(cache-control|expires|etag|last-modified|age):"
Check the Redis Object Cache status in WordPress
$wp redis status --path=/var/www/vhosts/example.com/httpdocs
Flush a single Redis database (FLUSHDB)
$redis-cli -n 0 FLUSHDB
Flush all Redis databases (FLUSHALL)
$redis-cli FLUSHALL
Flush Memcached completely (flush_all)
$printf 'flush_all\nquit\n' | nc 127.0.0.1 11211
Flush the WordPress object cache
$wp cache flush --path=/var/www/vhosts/example.com/httpdocs
Purge LiteSpeed Cache for a WordPress site with WP-CLI
$wp litespeed-purge all --path=/var/www/vhosts/example.com/httpdocs
Query a DNS record directly at the authoritative nameserver
$dig @$(dig +short example.com NS | head -n 1) example.com A +norecurse +short