用于检查指定的缓存特性是否被支持,常用于脚本中判断缓存后端能力。
适合在需要验证缓存功能可用性时使用,如检查是否支持 add_multiple 等特性。
<feature>
$ wp cache supports add_multiple $ echo $? 0
if ! wp cache supports non_existing; then echo 'non_existing is not supported' fi