caching not working
-
I have a list of id’s I want cached so I don’t have to built it oall the time but for some reason it never caches. Any idea what could be wrong?
$top_parents_ids = wp_cache_get( 'cached_top_parent_ids' ); if ( false == $top_parents_ids ) { echo('not cached'); $top_parents = array('South America','North America','Europe','Oceania','Africa'); $top_parents_ids = array(); foreach($top_parents as $top_parent){ if ($term = term_exists($top_parent,'photo_gallery')) array_push($top_parents_ids,$term['term_id']); } wp_cache_set('cached_top_parent_ids', $top_parents_ids); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘caching not working’ is closed to new replies.