Skip to content
Snippets Groups Projects
Commit 8b7ba752 authored by Erick Hitter's avatar Erick Hitter
Browse files

Timer should fire before anything happens, including building the cache key from a URL

parent 20469b96
Branches
No related tags found
No related merge requests found
...@@ -57,18 +57,16 @@ function redis_page_cache_exception_handler( $exception ) { ...@@ -57,18 +57,16 @@ function redis_page_cache_exception_handler( $exception ) {
* *
* DO NOT EDIT BELOW THIS LINE! * DO NOT EDIT BELOW THIS LINE!
*/ */
$redis_page_cache_config['current_url'] = redis_page_cache_get_clean_url();
$redis_page_cache_config['redis_key'] = md5( 'v' . $redis_page_cache_config['cache_version'] . '-' . $redis_page_cache_config['current_url'] );
// Start the timer so we can track the page load time // Start the timer so we can track the page load time
if ( $redis_page_cache_config['debug'] || $redis_page_cache_config['stats'] ) { if ( $redis_page_cache_config['debug'] || $redis_page_cache_config['stats'] ) {
$start = microtime(); $start = microtime();
} }
/** // Make run-time additions to configuration
* SET SEPARATE CACHES FOR BROAD DEVICE TYPES $redis_page_cache_config['current_url'] = redis_page_cache_get_clean_url();
*/ $redis_page_cache_config['redis_key'] = md5( 'v' . $redis_page_cache_config['cache_version'] . '-' . $redis_page_cache_config['current_url'] );
$redis_page_cache_config['redis_key'] = redis_page_cache_set_device_key( $redis_page_cache_config['redis_key'] ); $redis_page_cache_config['redis_key'] = redis_page_cache_set_device_key( $redis_page_cache_config['redis_key'] );
/** /**
* UTILITY FUNCTIONS * UTILITY FUNCTIONS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment