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

Placeholder for future cache variants

parent a95e5255
Branches
No related tags found
No related merge requests found
...@@ -36,6 +36,13 @@ $GLOBALS['wp_redis_cache_config']['redis_key'] = md5( $GLOBALS['wp_redis_cache ...@@ -36,6 +36,13 @@ $GLOBALS['wp_redis_cache_config']['redis_key'] = md5( $GLOBALS['wp_redis_cache
// Start the timer so we can track the page load time // Start the timer so we can track the page load time
$start = microtime(); $start = microtime();
/**
* MOBILE HANDLING
*/
if ( wp_redis_cache_is_mobile_request() ) {
$GLOBALS['wp_redis_cache_config']['redis_key'] = 'MO-' . $GLOBALS['wp_redis_cache_config']['redis_key'];
}
/** /**
* UTILITY FUNCTIONS * UTILITY FUNCTIONS
*/ */
...@@ -106,6 +113,13 @@ function wp_redis_cache_get_clean_url( $secret ) { ...@@ -106,6 +113,13 @@ function wp_redis_cache_get_clean_url( $secret ) {
return str_replace( $replace_keys, '', $url ); return str_replace( $replace_keys, '', $url );
} }
/**
*
*/
function wp_redis_cache_is_mobile_request() {
return false;
}
/** /**
* Establish a connection to the Redis server * Establish a connection to the Redis server
* *
......
...@@ -245,11 +245,13 @@ class WP_Redis_Cache { ...@@ -245,11 +245,13 @@ class WP_Redis_Cache {
$redis_key = md5( $permalink ); $redis_key = md5( $permalink );
$redis->del( $redis_key ); $redis->del( $redis_key );
$redis->del( 'MO-' . $redis_key );
//refresh the front page //refresh the front page
$front_page = get_home_url( '/' ); $front_page = get_home_url( '/' );
$redis_key = md5( $front_page ); $redis_key = md5( $front_page );
$redis->del( $redis_key ); $redis->del( $redis_key );
$redis->del( 'MO-' . $redis_key );
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment