add support for cache purge requests via GET from admin or PURGE method. PURGE doesn't quite work yet, so we skip testing that one.

This commit is contained in:
Joshua Marantz
2014-06-19 09:34:40 -04:00
parent 10f5093bf6
commit 7293f649d1
3 changed files with 35 additions and 1 deletions
+6
View File
@@ -250,6 +250,12 @@ else
exit 4
fi
# check_stat in system_test_helpers.sh needs to know whether statstistics are
# enabled, which is always the case for ngx_pagespeed.
statistics_enabled=1
CACHE_FLUSH_TEST="on"
CACHE_PURGE_METHODS="GET" # PURGE is not working yet.
# run generic system tests
SYSTEM_TEST_FILE="$MOD_PAGESPEED_DIR/src/net/instaweb/system/system_test.sh"
+15
View File
@@ -968,6 +968,21 @@ http {
pagespeed InPlaceResourceOptimization on;
}
server {
listen @@SECONDARY_PORT@@;
server_name purge.example.com;
# Test purging individual URLs without flushing the entire metadata cache.
pagespeed EnableCachePurge on;
pagespeed PurgeMethod PURGE;
root "@@SERVER_ROOT@@";
pagespeed FileCachePath "@@FILE_CACHE@@_purge";
pagespeed DisableFilters add_instrumentation;
pagespeed RewriteLevel PassThrough;
pagespeed EnableFilters rewrite_css;
}
server {
listen @@PRIMARY_PORT@@;
server_name localhost;