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
No related branches found
No related tags found
No related merge requests found
......@@ -57,18 +57,16 @@ function redis_page_cache_exception_handler( $exception ) {
*
* 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
if ( $redis_page_cache_config['debug'] || $redis_page_cache_config['stats'] ) {
$start = microtime();
}
/**
* SET SEPARATE CACHES FOR BROAD DEVICE TYPES
*/
$redis_page_cache_config['redis_key'] = redis_page_cache_set_device_key( $redis_page_cache_config['redis_key'] );
// Make run-time additions to configuration
$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'] );
/**
* UTILITY FUNCTIONS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment