2022年4月

最近使用composer发现报如下错误:
`
[ComposerDownloaderTransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
`

1º: 下载certificate:
wget http://curl.haxx.se/ca/cacert.pem --no-check-certificate
2º: Export it:
export COMPOSER_CAFILE='/home/user/cacert.pem'
这个路径必需是第一步下载文件的位置
3º: Run composer:
composer install

from: https://github.com/composer/composer/issues/3346#issuecomment-285460207

memcahche不像redis那样有ttl命令可以直接查看key的过期时间.不过通过操作开始实现.

1 stats items
该命令输出的结果会类似如下:
STAT items:1:number 66
其中1,就是slab_id, 66表示在slab为1下有key 66个.

2 stats cachedump slab_id count (count表示一次显示几个,0表示全部显示)
该命令会输出结果每行会类似如下:
ITEM abc [100 b; 1528336485 s]
其中键名abc, 占用100byte, 过期时间1528336485(unix时间戳形式)