ennexa/amp-update-cache 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: CC0-1.0
  • 更新时间: 2018-04-25