From 946cae67f412adea3d19e9a63b798e7f5976f7e0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 31 Dec 2005 22:34:58 +0000 Subject: [PATCH] Default expiration is too long. Change it to 15 minutes. git-svn-id: https://develop.svn.wordpress.org/trunk@3386 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/cache.php | 2 +- wp-includes/functions-post.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/cache.php b/wp-includes/cache.php index ecad5c6a4d..fee1a887d3 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -53,7 +53,7 @@ define('CACHE_SERIAL_FOOTER', "\n?".">"); class WP_Object_Cache { var $cache_dir; var $cache_enabled = false; - var $expiration_time = 86400; + var $expiration_time = 900; var $flock_filename = 'wp_object_cache.lock'; var $cache = array (); var $dirty_objects = array (); diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 2eb3a0d375..358ab3fe5a 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -121,7 +121,7 @@ function wp_insert_post($postarr = array()) { if ($update) { $wpdb->query( - "UPDATE $wpdb->posts SET + "UPDATE IGNORE $wpdb->posts SET post_author = '$post_author', post_date = '$post_date', post_date_gmt = '$post_date_gmt', @@ -143,7 +143,7 @@ function wp_insert_post($postarr = array()) { WHERE ID = $post_ID"); } else { $wpdb->query( - "INSERT INTO $wpdb->posts + "INSERT IGNORE INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type) VALUES ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");