Last active
February 19, 2016 08:58
-
-
Save wgkoro/4702394 to your computer and use it in GitHub Desktop.
Nginx Proxy Cache Purge用のパッチ。 スマホやガラケー用のキャッシュをpurgeさせるためのURL(/pg_s/xxx, /pg_f/xxx)にも同時にアクセスさせる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** nginx-proxy-cache-purge_org.php 2012-04-09 06:22:30.000000000 +0900 | |
--- nginx-proxy-cache-purge_new.php 2013-02-04 00:35:13.000000000 +0900 | |
*************** | |
*** 13,18 **** | |
--- 13,20 ---- | |
$link = get_permalink($post_id); | |
$parse = parse_url($link); | |
$post_url = $parse[scheme].'://'.$parse[host].'/purge'.$parse[path]; | |
+ $post_url_sp = $parse[scheme].'://'.$parse[host].'/pg_s'.$parse[path]; | |
+ $post_url_ft = $parse[scheme].'://'.$parse[host].'/pg_f'.$parse[path]; | |
#home page purge url | |
$home_page = home_url(); | |
*************** | |
*** 39,44 **** | |
--- 41,48 ---- | |
#array of purge urls | |
$urls = array( | |
$post_url, | |
+ $post_url_sp, | |
+ $post_url_ft, | |
$home_page_url, | |
$feed_url, | |
$comments_feed_url, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment