Make WordPress Core


Ignore:
Timestamp:
09/14/2005 12:34:04 AM (21 years ago)
Author:
ryan
Message:

Add clean_post_cache() and clean_page_cache(). Reset GUID when transitioning from draft to publish. fixes #1257

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2872 r2873  
    11681168}
    11691169
     1170function clean_post_cache($id) {
     1171        global $post_cache;
     1172       
     1173        if ( isset( $post_cache[$id] ) )
     1174                unset( $post_cache[$id] );
     1175}
     1176
    11701177function update_page_cache(&$pages) {
    11711178        global $page_cache;
    … …  
    11771184                $page_cache[$pages[$i]->ID] = &$pages[$i];
    11781185        }
     1186}
     1187
     1188
     1189function clean_page_cache($id) {
     1190        global $page_cache;
     1191       
     1192        if ( isset( $page_cache[$id] ) )
     1193                unset( $page_cache[$id] );
    11791194}
    11801195
    … …  
    12651280
    12661281function clean_user_cache($id) {
     1282        global $cache_userdata;
     1283
    12671284        if ( isset( $cache_userdata[$id] ) )
    12681285                unset( $cache_userdata[$id] );
Note: See TracChangeset for help on using the changeset viewer.