Skip to content

CheckCache 缓存检查器

实例化

php
new \think\health\Check\CheckCache(
    /**
     * 需要检测的缓存
     * 如果为空,则检测所有缓存
     * @var array<string>
     */
    stores: [],
    /**
     * 缓存key
     * @var string
     */
    key: 'health_check_cache_key',
    /**
     * 缓存value
     * @var string
     */
    value: 'health_check_cache_value'
)

参数说明

参数类型是否必传默认值说明
storesarray<string>[]需要检测的缓存
如果为空,则检测所有缓存
keystringhealth_check_cache_key缓存 key
valuestringhealth_check_cache_value缓存 value