ennexa/amp-update-cache
最新稳定版本:0.1
Composer 安装命令:
composer require ennexa/amp-update-cache
包简介
PHP Class to clear Google AMP Cache
README 文档
README
A simple PHP Class to update Google AMP Cache
Installation
composer require ennexa/amp-update-cache:dev-master
Usage
To purge the cache for https://www.prokerala.com/health/?amp=1
$var = new Ennexa\AmpCache\Update(PATH_TO_YOUR_PRIVATE_KEY); // Make sure your private key is outside document root $status = $var->purge('https://www.prokerala.com/health/?amp=1');
The script will purge the cache url from all the caches listed in AMP Project's official caches list.
If you want to purge only Google's AMP cache, you can filter the list as below
$updater = new Ennexa\AmpCache\Update(PATH_TO_YOUR_PRIVATE_KEY); $updater->setCache(array_filter($updater->getCache(), function($cache) { return 'google' === $cache->id; })); $status = $updater->purge('https://www.prokerala.com/health/?amp=1');
统计信息
- 总下载量: 34.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: CC0-1.0
- 更新时间: 2018-04-25