Commit 7e5a41c0 authored by Erick Hitter's avatar Erick Hitter
Browse files

Placeholder for future cache variants

parent a95e5255
......@@ -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 = 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
*/
......@@ -106,6 +113,13 @@ function wp_redis_cache_get_clean_url( $secret ) {
return str_replace( $replace_keys, '', $url );
}
/**
*
*/
function wp_redis_cache_is_mobile_request() {
return false;
}
/**
* Establish a connection to the Redis server
*
......
......@@ -245,11 +245,13 @@ class WP_Redis_Cache {
$redis_key = md5( $permalink );
$redis->del( $redis_key );
$redis->del( 'MO-' . $redis_key );
//refresh the front page
$front_page = get_home_url( '/' );
$redis_key = md5( $front_page );
$redis->del( $redis_key );
$redis->del( 'MO-' . $redis_key );
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment