Commit Graph

86 Commits

Author SHA1 Message Date
Sergey Biryukov 8de46fae8b Correct inline docs for cache.php. props ocean90. fixes #23058.
git-svn-id: https://develop.svn.wordpress.org/trunk@23328 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-22 20:44:30 +00:00
Ryan Boren 6d8bce688f Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@22634 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 15:11:29 +00:00
Ryan Boren 7ba5099795 Objects no longer need to be explicitly passed by ref to call_user_func*() to be callable. Props wonderboymusic. fixes #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22118 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 20:00:16 +00:00
Ryan Boren e6c6bcd740 Update phpdoc and deprecation for wp_cache_reset(). see #21434
git-svn-id: https://develop.svn.wordpress.org/trunk@22111 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 15:32:55 +00:00
Ryan Boren 6248f81649 Add @since to wp_cache_switch_to_blog(). Props SergeyBiryukov. fixes #21434
git-svn-id: https://develop.svn.wordpress.org/trunk@22086 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-30 14:02:59 +00:00
Ryan Boren 691425a3ff Introduce wp_cache_switch_to_blog() and WP_Object_Cache::switch_to_blog() as a lighter/faster way to switch the cache to a new blog id.
Add the blog id to the cache keys for multisite installs.

Use wp_cache_switch_to_blog() instead of wp_cache_init() in switch_to_blog().

Use wp_cache_switch_to_blog() instead of wp_cache_reset() in wp_start_object_cache().

Deprecate wp_cache_reset().

This avoids the many queries needed to re-prime the cache after switch_to_blog() on multisite installs using the default cache backend.

fixes #21434



git-svn-id: https://develop.svn.wordpress.org/trunk@21403 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-02 18:31:14 +00:00
Andrew Nacin 09c0ae245f If $group is empty in WP_Object_Cache::decr(), consider it to be 'default'.
This is consistent with the rest of the cache methods wrapped by
functions; the functions pass an empty string by default, hence
the need for this check.

props bananastalktome.
fixes #21327.



git-svn-id: https://develop.svn.wordpress.org/trunk@21294 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-20 20:15:25 +00:00
Andrew Nacin 237b7f6dbe Improve the performance of WP_Object_Cache's _exists() method.
Results showed a performance improvement on one admin screen of 90ms (~2%).

fixes #21320. see #20004.



git-svn-id: https://develop.svn.wordpress.org/trunk@21285 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-20 04:21:42 +00:00
Jon Cave c306dddb62 Prevent notices by checking if the $group key isset(). See #20004.
git-svn-id: https://develop.svn.wordpress.org/trunk@20091 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-02 21:57:03 +00:00
Ryan Boren 21bb418c04 Fix NULL and FALSE in WP_Object_Cache and make found/not-found unambiguous. Props andy. fixes #20004
git-svn-id: https://develop.svn.wordpress.org/trunk@20089 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-02 21:10:37 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Ryan Boren a8d77cbae9 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: https://develop.svn.wordpress.org/trunk@19687 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 20:50:54 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Andrew Nacin 90f95e0204 new does not require by reference.
git-svn-id: https://develop.svn.wordpress.org/trunk@18995 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-18 20:20:59 +00:00
Jon Cave 461af47e10 Remove the non_existent_objects property from WP_Object_Cache. Fixes #16274.
git-svn-id: https://develop.svn.wordpress.org/trunk@18682 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-15 20:28:06 +00:00
Jon Cave 6d75218f6a Introduce wp_suspend_cache_addition() to allow reduced memory usage when cache additions aren't useful. Fixes #5389.
git-svn-id: https://develop.svn.wordpress.org/trunk@18681 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-15 20:23:00 +00:00
Ryan Boren 332d6d1351 Improve cron locking. Avoid multiple cron processes looping over the same events. fixes #17462
git-svn-id: https://develop.svn.wordpress.org/trunk@18659 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-09 19:59:44 +00:00
Ryan Boren 048c04c07c Update cache.php phpdoc. Props SergeyBiryukov. fixes #18607
git-svn-id: https://develop.svn.wordpress.org/trunk@18653 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 17:19:09 +00:00
Ryan Boren 750065c50b Standardize variable names. Consistently use and . fixes #18607
git-svn-id: https://develop.svn.wordpress.org/trunk@18644 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-06 21:13:11 +00:00
Jon Cave 205aa5ba5c Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: https://develop.svn.wordpress.org/trunk@18633 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-03 16:02:41 +00:00
Ryan Boren ee123a28d5 Introduce wp_cache_incr() and wp_cache_decr(). fixes #18494
git-svn-id: https://develop.svn.wordpress.org/trunk@18580 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-22 17:39:44 +00:00
Ryan Boren 259c415b7b Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: https://develop.svn.wordpress.org/trunk@17613 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-06 17:44:29 +00:00
Ryan Boren d470b22d59 Remove PHP4 constructors. Props hakre. see #16768
git-svn-id: https://develop.svn.wordpress.org/trunk@17604 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-05 17:25:08 +00:00
Andrew Nacin ccea27cbe7 More param fixes, props duck_. see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@16469 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-18 19:12:48 +00:00
Peter Westwood a91abd41d8 Strip back the stats in the memory based object cache to something less verbose and useless.
git-svn-id: https://develop.svn.wordpress.org/trunk@16288 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-11 10:55:06 +00:00
Andrew Nacin 142fcc3a35 Fix html in WP_Object_Cache::stats. props Utkarsh, fixes #15183.
git-svn-id: https://develop.svn.wordpress.org/trunk@15884 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 13:15:24 +00:00
Andrew Nacin 69b3664fe0 esc_html in WP_Object_Cache::stats(). fixes #15003.
git-svn-id: https://develop.svn.wordpress.org/trunk@15767 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-09 11:38:12 +00:00
Andrew Nacin 9494e4ce7e Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Andrew Nacin 6f57a1a3ec s/echos/echoes/ in phpdoc. props demetris, fixes #13742.
git-svn-id: https://develop.svn.wordpress.org/trunk@15148 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-06 05:16:32 +00:00
Ryan Boren e213402692 Preload commonly loaded site options when running multisite without a persistent cache. Introduce wp_cache_reset() and call it instead of wp_cache_init() when re-initing after the blog ID chanages to avoid throwing out the entire cache. Pass cached site options through the site option filter when fetching.
git-svn-id: https://develop.svn.wordpress.org/trunk@13066 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-12 17:06:43 +00:00
Ryan Boren 10221b01f2 Fix typos. Fix assignment. Remove passing of non-existent arg. Props ScottMac. fixes #12193
git-svn-id: https://develop.svn.wordpress.org/trunk@13054 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-11 16:58:32 +00:00
Ryan Boren 0aba3305b3 Use clone to break object refs when setting and getting cache. see #8146 #8191
git-svn-id: https://develop.svn.wordpress.org/trunk@9740 602fd350-edb4-49c9-b593-d223f7449a82
2008-11-17 21:01:12 +00:00
Peter Westwood 000f6ec3b6 phpDoc corrections for wp-includes. See #7550 props santosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@8742 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-27 06:45:13 +00:00
Ryan Boren 2272a1a950 Trailing whitespace cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@8600 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-09 05:36:14 +00:00
Ryan Boren be87986f7a phpdoc updates from jacobsantos. see #7038
git-svn-id: https://develop.svn.wordpress.org/trunk@7990 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-25 15:45:05 +00:00
Ryan Boren 66bb3c870e wp_cache_add_global_groups() and wp_cache_add_non_persistent_groups(). fixes #6740
git-svn-id: https://develop.svn.wordpress.org/trunk@7986 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-22 17:28:54 +00:00
Ryan Boren 60b802e55d Some notice fixes from Nazgul. fixes #3155
git-svn-id: https://develop.svn.wordpress.org/trunk@6711 602fd350-edb4-49c9-b593-d223f7449a82
2008-02-02 18:42:09 +00:00
Ryan Boren 083555f56b phpdoc for cache.php from darkdragon. fixes #5511
git-svn-id: https://develop.svn.wordpress.org/trunk@6543 602fd350-edb4-49c9-b593-d223f7449a82
2008-01-03 04:35:47 +00:00
Ryan Boren a4b001ee03 Fix cache close. see #5570
git-svn-id: https://develop.svn.wordpress.org/trunk@6540 602fd350-edb4-49c9-b593-d223f7449a82
2008-01-02 23:03:25 +00:00
Ryan Boren 9ca1712149 Remove persistent object cache. fixes #5570
git-svn-id: https://develop.svn.wordpress.org/trunk@6539 602fd350-edb4-49c9-b593-d223f7449a82
2008-01-02 22:13:16 +00:00
Ryan Boren dd54d8ffe6 Allow single post ID and comma delimited list of post IDs to be passed to update_postmeta_cache(). Fix default cache to allow storage of empty array. see #5194
git-svn-id: https://develop.svn.wordpress.org/trunk@6247 602fd350-edb4-49c9-b593-d223f7449a82
2007-10-14 01:08:07 +00:00
Ryan Boren 1b36113b6a Space before slash to properly close br tag. Props tmountjr. fixes #4717
git-svn-id: https://develop.svn.wordpress.org/trunk@5870 602fd350-edb4-49c9-b593-d223f7449a82
2007-08-14 03:12:24 +00:00
Ryan Boren 163f22deb5 Comment caching. Reduce queries on edit-comments.php page. Add non-persistent cache groups. Hat tip to hovenko. fixes #4387
git-svn-id: https://develop.svn.wordpress.org/trunk@5666 602fd350-edb4-49c9-b593-d223f7449a82
2007-06-08 00:20:22 +00:00
Ryan Boren 6bf777e1d9 Don't load category cache from old tables. see #4189
git-svn-id: https://develop.svn.wordpress.org/trunk@5544 602fd350-edb4-49c9-b593-d223f7449a82
2007-05-25 09:45:55 +00:00
rob1n 3c8cb11aee Delete the cache in tmp even if the copy failed. Props andy. fixes #4141
git-svn-id: https://develop.svn.wordpress.org/trunk@5255 602fd350-edb4-49c9-b593-d223f7449a82
2007-04-12 16:31:47 +00:00
Mark Jaquith 5acfcd9fea trailing tabs and whitespace cleanup.
git-svn-id: https://develop.svn.wordpress.org/trunk@4953 602fd350-edb4-49c9-b593-d223f7449a82
2007-02-27 15:24:54 +00:00
Mark Jaquith 26f5beaa3d make sure nothing going into the object cache is being passed by reference. fixes #3726
git-svn-id: https://develop.svn.wordpress.org/trunk@4856 602fd350-edb4-49c9-b593-d223f7449a82
2007-02-01 09:16:15 +00:00
Mark Jaquith ea8fc7def2 Introduce Notoptions and Alloptions caching, so that all options (and previously attempted Notoptions) are read from the cache in one go. Should reduce cache misses to zero or close to it. fixes #3726
git-svn-id: https://develop.svn.wordpress.org/trunk@4855 602fd350-edb4-49c9-b593-d223f7449a82
2007-02-01 08:53:08 +00:00
Ryan Boren a4ff55c30a Fiddle with object destruction and shutdown. Curses upon php 5.2. fixes #3354
git-svn-id: https://develop.svn.wordpress.org/trunk@4686 602fd350-edb4-49c9-b593-d223f7449a82
2007-01-06 23:36:51 +00:00
Ryan Boren e44ea1ff93 Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986
git-svn-id: https://develop.svn.wordpress.org/trunk@4495 602fd350-edb4-49c9-b593-d223f7449a82
2006-11-19 07:56:05 +00:00