From b0889cfb53abd764cb10fbe91f4614b686c0bcd9 Mon Sep 17 00:00:00 2001 From: Roger Theriault Date: Wed, 15 Aug 2018 15:00:27 -0400 Subject: [PATCH] Add an option to disable the static endpoint cache for users who need fine-grain control over the endpoint base --- classes/class-wpcom-liveblog-rest-api.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/class-wpcom-liveblog-rest-api.php b/classes/class-wpcom-liveblog-rest-api.php index c0336bd24..76ac93ac6 100644 --- a/classes/class-wpcom-liveblog-rest-api.php +++ b/classes/class-wpcom-liveblog-rest-api.php @@ -28,7 +28,12 @@ public static function load() { public static function build_endpoint_base() { - if ( ! empty( self::$endpoint_base ) ) { + /** + * static caching is enabled by default + * + * @param bool true - yes cache; false - do not cache + */ + if ( ! empty( self::$endpoint_base ) && apply_filters( 'liveblog_cache_endpoint_base', true ) ) { // @codeCoverageIgnoreStart return self::$endpoint_base;