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:
@@ -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"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user