From a744f5aefca2ee67cecf6fcadd82ae798da90c2f Mon Sep 17 00:00:00 2001 From: Panos Paganis Date: Sat, 28 Nov 2015 13:03:32 +0200 Subject: [PATCH] Always enable Timber cache in Production --- includes/class-nanga-third-party.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-nanga-third-party.php b/includes/class-nanga-third-party.php index 37f9d82..1e2d63e 100644 --- a/includes/class-nanga-third-party.php +++ b/includes/class-nanga-third-party.php @@ -208,6 +208,9 @@ public function features_timber() { add_filter( 'timber/cache/location', function () { return WP_CONTENT_DIR . '/cache/timber'; } ); + if ( defined( 'WP_ENV' ) && 'production' === WP_ENV ) { + Timber::$cache = true; + } } } }