Drew Jaynes
81524f3bfc
Filesystem: Following the introduction of the KB|MB|GB|TB_IN_BYTES
constants in [35286], use them in various places in core.
...
Props sudar.
Fixes #22405 .
Built from https://develop.svn.wordpress.org/trunk@35325
git-svn-id: http://core.svn.wordpress.org/trunk@35291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 14:03:25 +00:00
Drew Jaynes
4279a9c39e
Docs: Improve documentation for the WP_Object_Cache
class.
...
Spaces out parameter documentation for readability, fixes some minor syntactical issues, and adds some missing `@access` tags or reorders tags according to the PHP docs standards.
Also, documents `&$found`, the fourth parameter for the `get()` method, and adds missing parameter and return descriptions for the `_exists()` utility method.
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34227
git-svn-id: http://core.svn.wordpress.org/trunk@34191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 10:03:26 +00:00
Drew Jaynes
5172621c1d
Docs: Remove an errant change made to a _deprecated_function()
call in wp_cache_reset()
introduced in [34225].
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34226
git-svn-id: http://core.svn.wordpress.org/trunk@34190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 09:42:24 +00:00
Drew Jaynes
4e4737685e
Docs: Add more complete documentation for top-level object cache functionality.
...
Adds some `@see` tags for corresponding `WP_Object_Cache` methods to DocBlocks for top-level functions. Also adds a standard description for the `@global` tags, spacing for parameter docs readability, and finally, properly marks optional parameters as such.
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34225
git-svn-id: http://core.svn.wordpress.org/trunk@34189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 09:40:25 +00:00
Scott Taylor
641c07533d
Clarify wp-includes/cache.php
docs with some more precise language.
...
Props danielbachhuber.
Fixes #33734 .
Built from https://develop.svn.wordpress.org/trunk@34010
git-svn-id: http://core.svn.wordpress.org/trunk@33979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 18:24:24 +00:00
Scott Taylor
d5f666013f
Fix copy pasta in wp_cache_decr()
doc block.
...
Props danielbachhuber.
Fixes #33548 .
Built from https://develop.svn.wordpress.org/trunk@33809
git-svn-id: http://core.svn.wordpress.org/trunk@33777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-30 03:04:21 +00:00
Drew Jaynes
bf371f1577
Docs: Standardize @deprecated
tag formatting in the DocBlock for WP_Object_Cache:reset()
.
...
Props Alphawolf.
See #28806 .
Built from https://develop.svn.wordpress.org/trunk@33678
git-svn-id: http://core.svn.wordpress.org/trunk@33645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 22:39:24 +00:00
Scott Taylor
ebd3201268
Add/standardize missing doc blocks for cache.php
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32539
git-svn-id: http://core.svn.wordpress.org/trunk@32509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 04:24:26 +00:00
Scott Taylor
9b3271f635
In cache.php
, clarify some return
docs. Some WP_Object_Cache
methods return void
, so those wrapper functions don't need to return at all.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32528
git-svn-id: http://core.svn.wordpress.org/trunk@32498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-21 20:22:24 +00:00
Dominik Schilling
64fc7294b6
Use HTTPS URLs for codex.wordpress.org.
...
see #27115 .
Built from https://develop.svn.wordpress.org/trunk@32116
git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Scott Taylor
2bcae51cfd
Declare multisite
as a field for WP_Object_Cache
.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31682
git-svn-id: http://core.svn.wordpress.org/trunk@31663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:18:27 +00:00
Scott Taylor
dccf5ceb90
Empty return
statements are unnecessary at the end of functions.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31679
git-svn-id: http://core.svn.wordpress.org/trunk@31660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:09:27 +00:00
Scott Taylor
0a511680f4
Adding a @return
annotation to constructors is generally not recommended as a constructor does not have a meaningful return value. Constructors do not have meaningful return values, anything that is returned from here is discarded.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31126
git-svn-id: http://core.svn.wordpress.org/trunk@31107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:54:23 +00:00
Scott Taylor
e619abda6e
Improve various @param
docs for src/wp-includes/*
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30681
git-svn-id: http://core.svn.wordpress.org/trunk@30671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:34:24 +00:00
Drew Jaynes
a8583d5f19
Fix some words that aren't words.
...
See #28885 .
Built from https://develop.svn.wordpress.org/trunk@29454
git-svn-id: http://core.svn.wordpress.org/trunk@29232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-09 19:30:17 +00:00
Drew Jaynes
3665b5a1a1
Add periods to short descriptions for magic methods added in [28501], [28521], and [28524].
...
See #22234 and #28885 .
Built from https://develop.svn.wordpress.org/trunk@29165
git-svn-id: http://core.svn.wordpress.org/trunk@28949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 01:12:14 +00:00
Drew Jaynes
915777e073
Fill out inline documentation for magic methods added to the WP_Object_Cache
class in [28502], [28521], [28524].
...
See #27881 , #22234 and #28885 .
Built from https://develop.svn.wordpress.org/trunk@29146
git-svn-id: http://core.svn.wordpress.org/trunk@28930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 23:46:14 +00:00
Scott Taylor
85f73cf458
Classes that have __set()
also need __isset()
and __unset()
.
...
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28524
git-svn-id: http://core.svn.wordpress.org/trunk@28350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:52:14 +00:00
Scott Taylor
821246b4ae
Some classes with __get()
method also need __set()
.
...
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28521
git-svn-id: http://core.svn.wordpress.org/trunk@28347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:31:15 +00:00
Scott Taylor
2e9ce6fc87
Fix fatal error in unit test.
...
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28520
git-svn-id: http://core.svn.wordpress.org/trunk@28346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:25:14 +00:00
Scott Taylor
d9cd56f9ad
Add access modifiers to methods/members in WP_Object_Cache
. Add a magic __get()
method for BC.
...
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28502
git-svn-id: http://core.svn.wordpress.org/trunk@28328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:16:15 +00:00
Scott Taylor
2efcdcf297
Rather than removing the 3rd argument in WP_Object_Cache::delete()
, mark it as $deprecated
.
...
See [27064].
Props SergeyBiryukov.
Fixes #22478 .
Built from https://develop.svn.wordpress.org/trunk@27162
git-svn-id: http://core.svn.wordpress.org/trunk@27028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-11 16:41:12 +00:00
Scott Taylor
38bd18bd08
Remove $force
argument from WP_Object_Cache::delete()
. From @nacin: "This was for internal-use-only, I don't think _deprecated_argument() is needed, but let's put a comment somewhere just so we know we'd have to be careful if we ever want to add a third argument here later."
...
`$force` argument has been removed, and docs were updated.
Fixes #22478 .
Built from https://develop.svn.wordpress.org/trunk@27064
git-svn-id: http://core.svn.wordpress.org/trunk@26937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-01 22:25:16 +00:00
Drew Jaynes
cd8cedc40d
First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
...
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713 .
Built from https://develop.svn.wordpress.org/trunk@26868
git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Andrew Nacin
85d4685894
Always pass integer expirations to cache backends.
...
props SergeyBiryukov, andreasnrb.
fixes #25308 .
Built from https://develop.svn.wordpress.org/trunk@25451
git-svn-id: http://core.svn.wordpress.org/trunk@25372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 17:43:09 +00:00
Sergey Biryukov
566dd6e476
Correct inline docs for cache.php. props ocean90. fixes #23058 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-22 20:44:30 +00:00
Ryan Boren
06ee370814
Pinking shears
...
git-svn-id: http://core.svn.wordpress.org/trunk@22634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 15:11:29 +00:00
Ryan Boren
77518e9c71
Objects no longer need to be explicitly passed by ref to call_user_func*() to be callable. Props wonderboymusic. fixes #21865
...
git-svn-id: http://core.svn.wordpress.org/trunk@22118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 20:00:16 +00:00
Ryan Boren
7dc670fc8d
Update phpdoc and deprecation for wp_cache_reset(). see #21434
...
git-svn-id: http://core.svn.wordpress.org/trunk@22111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 15:32:55 +00:00
Ryan Boren
9c9ecb315e
Add @since to wp_cache_switch_to_blog(). Props SergeyBiryukov. fixes #21434
...
git-svn-id: http://core.svn.wordpress.org/trunk@22086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-30 14:02:59 +00:00
ryan
295ca4d76f
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: http://core.svn.wordpress.org/trunk@21403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-02 18:31:14 +00:00
nacin
167124051b
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: http://core.svn.wordpress.org/trunk@21294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-20 20:15:25 +00:00
nacin
5b2c145a4d
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: http://core.svn.wordpress.org/trunk@21285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-20 04:21:42 +00:00
duck_
c0892fbaf0
Prevent notices by checking if the $group key isset(). See #20004 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 21:57:03 +00:00
ryan
783e59e185
Fix NULL and FALSE in WP_Object_Cache and make found/not-found unambiguous. Props andy. fixes #20004
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 21:10:37 +00:00
ryan
e3b46b25d3
Lose EOF ?>. Clean up EOF newlines. fixes #12307
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
83b131f8e3
User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
07ff8b216b
Use one space, not two, after trailing punctuation. fixes #19537
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
nacin
89c0895887
new does not require by reference.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-18 20:20:59 +00:00
duck_
e085f4f0d6
Remove the non_existent_objects property from WP_Object_Cache. Fixes #16274 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-15 20:28:06 +00:00
duck_
cda68f14f9
Introduce wp_suspend_cache_addition() to allow reduced memory usage when cache additions aren't useful. Fixes #5389 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-15 20:23:00 +00:00
ryan
5ebcc1d3ea
Improve cron locking. Avoid multiple cron processes looping over the same events. fixes #17462
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-09 19:59:44 +00:00
ryan
6e68c7bfd9
Update cache.php phpdoc. Props SergeyBiryukov. fixes #18607
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-08 17:19:09 +00:00
ryan
4410168419
Standardize variable names. Consistently use and . fixes #18607
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-06 21:13:11 +00:00
duck_
e4ed63fc6f
Fix typos in documentation (wp-includes/[a-h]). See #18560 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
ryan
c93728e287
Introduce wp_cache_incr() and wp_cache_decr(). fixes #18494
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-22 17:39:44 +00:00
ryan
e3895262ef
Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@17613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-06 17:44:29 +00:00
ryan
b60c345536
Remove PHP4 constructors. Props hakre. see #16768
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@17604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 17:25:08 +00:00
nacin
b8ce0261df
More param fixes, props duck_. see #14783 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@16469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-18 19:12:48 +00:00
westi
0027abcb1a
Strip back the stats in the memory based object cache to something less verbose and useless.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@16288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-11 10:55:06 +00:00