-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
type: enhancementNew feature or requestNew feature or request
Description
Creating an issue with a copy of code that will be cleaned up, since it would need to be tested and re-added. Pulled from the Zoninator class.
// TODO: Caching needs to be testing properly before being implemented!
function get_zone_cache_key( $zone, $args = array() ) {
return '';
$meta_key = $this->get_zone_meta_key( $zone );
$hash = md5( serialize( $args ) );
return $meta_key . $hash;
}
function get_zone_posts_from_cache( $zone, $args = array() ) {
return false; // TODO: implement
$meta_key = $this->get_zone_meta_key( $zone );
$cache_key = $this->get_zone_cache_key( $zone, $args );
if ( $posts = wp_cache_get( $cache_key, $meta_key ) ) {
return $posts;
}
return false;
}
function add_zone_posts_to_cache( $posts, $zone, $args = array() ) {
return; // TODO: implement
$meta_key = $this->get_zone_meta_key( $zone );
$cache_key = $this->get_zone_cache_key( $zone, $args );
wp_cache_set( $cache_key, $posts, $meta_key );
}
function _empty_zone_posts_cache( $meta_key ) {
return; // TODO: implement
}Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request