Linux web205 5.14.0-446.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 3 16:10:18 UTC 2024 x86_64
Apache
Server IP : 86.110.243.205 & Your IP : 3.145.42.64
Domains :
Cant Read [ /etc/named.conf ]
User : jp029900
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
home /
jp029900 /
www_root /
wp-includes /
Delete
Unzip
Name
Size
Permission
Date
Action
ID3
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
IXR
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
PHPMailer
[ DIR ]
drwxr-xr-x
2021-01-03 21:11
Requests
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
SimplePie
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
Text
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
assets
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
block-patterns
[ DIR ]
drwxr-xr-x
2021-01-03 21:11
block-supports
[ DIR ]
drwxr-xr-x
2021-01-03 21:11
blocks
[ DIR ]
drwxr-xr-x
2021-07-19 13:45
certificates
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
css
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
customize
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
fonts
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
images
[ DIR ]
drwxr-xr-x
2020-06-23 06:14
js
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
pomo
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
random_compat
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
rest-api
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
sitemaps
[ DIR ]
drwxr-xr-x
2021-01-03 21:11
sodium_compat
[ DIR ]
drwxr-xr-x
2021-01-03 21:11
theme-compat
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
widgets
[ DIR ]
drwxr-xr-x
2020-06-22 14:07
admin-bar.php
32.6
KB
-rw-r--r--
2023-06-10 09:07
atomlib.php
11.67
KB
-rwxr-xr-x
2021-01-03 21:11
author-template.php
16.62
KB
-rwxr-xr-x
2021-07-19 13:45
block-patterns.php
1.42
KB
-rwxr-xr-x
2021-01-03 21:11
blocks.php
28.44
KB
-rwxr-xr-x
2023-05-17 05:50
bookmark-template.php
12.42
KB
-rwxr-xr-x
2021-07-19 13:45
bookmark.php
14.79
KB
-rwxr-xr-x
2022-08-31 02:18
cache-compat.php
1.02
KB
-rwxr-xr-x
2021-01-03 21:11
cache.php
9.29
KB
-rwxr-xr-x
2021-07-19 13:45
canonical.php
32.31
KB
-rwxr-xr-x
2021-07-19 13:45
capabilities.php
34.94
KB
-rwxr-xr-x
2021-07-19 13:45
category-template.php
54.26
KB
-rwxr-xr-x
2021-07-19 13:45
category.php
12.41
KB
-rwxr-xr-x
2021-01-03 21:11
class-IXR.php
2.48
KB
-rwxr-xr-x
2020-06-22 14:07
class-feed.php
529
B
-rwxr-xr-x
2020-06-22 14:07
class-http.php
38.78
KB
-rwxr-xr-x
2021-07-19 13:45
class-json.php
42.42
KB
-rwxr-xr-x
2021-01-03 21:11
class-oembed.php
407
B
-rwxr-xr-x
2020-06-22 14:07
class-phpass.php
7.15
KB
-rwxr-xr-x
2020-06-22 14:07
class-phpmailer.php
664
B
-rwxr-xr-x
2021-01-03 21:11
class-pop3.php
20.35
KB
-rwxr-xr-x
2021-01-03 21:11
class-requests.php
29.14
KB
-rwxr-xr-x
2021-01-03 21:11
class-simplepie.php
94.01
KB
-rwxr-xr-x
2021-01-03 21:11
class-smtp.php
457
B
-rwxr-xr-x
2021-07-19 13:45
class-snoopy.php
36.83
KB
-rwxr-xr-x
2021-01-03 21:11
class-walker-category-dropdown.php
2.08
KB
-rwxr-xr-x
2021-01-03 21:11
class-walker-category.php
7.71
KB
-rwxr-xr-x
2021-01-03 21:11
class-walker-comment.php
13.41
KB
-rwxr-xr-x
2021-01-03 21:11
class-walker-nav-menu.php
8.44
KB
-rwxr-xr-x
2021-01-03 21:11
class-walker-page-dropdown.php
2.25
KB
-rwxr-xr-x
2020-06-22 14:07
class-walker-page.php
6.88
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-admin-bar.php
16.59
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-ajax-response.php
5.12
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-application-passwords.php
10.38
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-list.php
4.37
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-block-parser.php
14.86
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-pattern-categories-registry.php
4.11
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-patterns-registry.php
4.4
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-styles-registry.php
4.61
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-block-supports.php
5.15
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-type-registry.php
4.58
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block-type.php
8.41
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-block.php
6.61
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-comment-query.php
44.42
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-comment.php
9.1
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-customize-control.php
24.93
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-customize-manager.php
196.48
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-customize-nav-menus.php
55.44
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-customize-panel.php
10.16
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-customize-section.php
10.72
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-customize-setting.php
29.07
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-customize-widgets.php
65.44
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-date-query.php
34.47
KB
-rwxr-xr-x
2022-10-18 07:22
class-wp-dependency.php
2.45
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-editor.php
68.9
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-embed.php
15.42
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-error.php
7.13
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-fatal-error-handler.php
7.36
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-feed-cache-transient.php
2.5
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-feed-cache.php
970
B
-rwxr-xr-x
2021-01-03 21:11
class-wp-hook.php
14.74
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-http-cookie.php
7.02
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-http-curl.php
12.06
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-http-encoding.php
6.5
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-http-ixr-client.php
3.39
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-http-proxy.php
5.73
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-http-requests-hooks.php
1.93
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-http-requests-response.php
4.24
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-http-response.php
2.88
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-http-streams.php
15.74
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-image-editor-gd.php
14.28
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-image-editor-imagick.php
25.86
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-image-editor.php
13.84
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-list-util.php
6.46
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-locale-switcher.php
4.9
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-locale.php
13.65
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-matchesmapregex.php
1.76
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-meta-query.php
27.22
KB
-rwxr-xr-x
2022-01-07 02:00
class-wp-metadata-lazyloader.php
5.23
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-network-query.php
18.72
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-network.php
12.09
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-object-cache.php
13.23
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-oembed-controller.php
6.63
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-oembed.php
29.61
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-paused-extensions-storage.php
4.81
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-post-type.php
20.33
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-post.php
6.27
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-query.php
132.78
KB
-rwxr-xr-x
2022-10-18 07:22
class-wp-recovery-mode-cookie-service.php
6.31
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-recovery-mode-email-service.php
10.41
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-recovery-mode-key-service.php
4.17
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-recovery-mode-link-service.php
3.32
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-recovery-mode.php
11.11
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-rewrite.php
61.37
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-role.php
2.44
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-roles.php
8.23
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-session-tokens.php
7.25
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-simplepie-file.php
3.18
KB
-rwxr-xr-x
2021-02-04 02:45
class-wp-simplepie-sanitize-kses.php
1.73
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-site-query.php
28.62
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-site.php
7.25
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-tax-query.php
18.98
KB
-rwxr-xr-x
2022-01-07 02:00
class-wp-taxonomy.php
13.03
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-term-query.php
36.39
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-term.php
5.15
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-text-diff-renderer-inline.php
716
B
-rwxr-xr-x
2020-06-22 14:07
class-wp-text-diff-renderer-table.php
16.4
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-theme.php
49.57
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-user-meta-session-tokens.php
2.92
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-user-query.php
30.6
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-user-request.php
2.14
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-user.php
21.62
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-walker.php
12.42
KB
-rwxr-xr-x
2021-01-03 21:11
class-wp-widget-factory.php
2.56
KB
-rwxr-xr-x
2020-06-22 14:07
class-wp-widget.php
17.48
KB
-rwxr-xr-x
2021-07-19 13:45
class-wp-xmlrpc-server.php
207.93
KB
-rwxr-xr-x
2021-09-09 04:42
class-wp.php
24.5
KB
-rwxr-xr-x
2021-07-19 13:45
class.wp-dependencies.php
12.57
KB
-rwxr-xr-x
2021-01-03 21:11
class.wp-scripts.php
18.49
KB
-rwxr-xr-x
2021-07-19 13:45
class.wp-styles.php
10.62
KB
-rwxr-xr-x
2021-01-03 21:11
comment-template.php
92.55
KB
-rwxr-xr-x
2021-07-19 13:45
comment.php
123.24
KB
-rwxr-xr-x
2022-10-18 07:22
compat.php
11.46
KB
-rwxr-xr-x
2021-01-03 21:11
cron.php
39.69
KB
-rwxr-xr-x
2021-07-19 13:45
date.php
406
B
-rwxr-xr-x
2020-06-22 14:07
default-constants.php
10.02
KB
-rwxr-xr-x
2021-01-03 21:11
default-filters.php
27.66
KB
-rwxr-xr-x
2021-07-19 13:45
default-widgets.php
2.07
KB
-rwxr-xr-x
2020-06-22 14:07
deprecated.php
121.72
KB
-rwxr-xr-x
2022-10-18 07:22
embed-template.php
341
B
-rwxr-xr-x
2020-06-22 14:07
embed.php
47.01
KB
-rwxr-xr-x
2023-05-17 05:50
error-protection.php
4.02
KB
-rwxr-xr-x
2021-01-03 21:11
feed-atom-comments.php
5.32
KB
-rwxr-xr-x
2020-06-22 14:07
feed-atom.php
3.03
KB
-rwxr-xr-x
2020-06-22 14:07
feed-rdf.php
2.61
KB
-rwxr-xr-x
2020-06-22 14:07
feed-rss.php
1.16
KB
-rwxr-xr-x
2020-06-22 14:07
feed-rss2-comments.php
3.97
KB
-rwxr-xr-x
2021-01-03 21:11
feed-rss2.php
3.71
KB
-rwxr-xr-x
2020-06-22 14:07
feed.php
22.43
KB
-rwxr-xr-x
2021-01-03 21:11
formatting.php
304.18
KB
-rwxr-xr-x
2023-05-17 05:50
functions.php
235.52
KB
-rwxr-xr-x
2022-10-18 07:22
functions.wp-scripts.php
13.11
KB
-rwxr-xr-x
2021-07-19 13:45
functions.wp-styles.php
8.11
KB
-rwxr-xr-x
2021-01-03 21:11
general-template.php
153.32
KB
-rwxr-xr-x
2021-07-19 13:45
http.php
21.86
KB
-rwxr-xr-x
2021-01-03 21:11
https-detection.php
6.71
KB
-rwxr-xr-x
2021-07-19 13:45
https-migration.php
4.62
KB
-rwxr-xr-x
2021-07-19 13:45
kses.php
61.96
KB
-rwxr-xr-x
2021-07-19 13:45
l10n.php
55.42
KB
-rwxr-xr-x
2023-05-17 05:50
link-template.php
143.44
KB
-rwxr-xr-x
2021-07-19 13:45
load.php
48.12
KB
-rwxr-xr-x
2021-07-19 13:45
locale.php
162
B
-rwxr-xr-x
2020-06-22 14:07
media-template.php
59
KB
-rwxr-xr-x
2022-10-18 07:22
media.php
168.74
KB
-rwxr-xr-x
2023-05-17 05:50
meta.php
58.2
KB
-rwxr-xr-x
2021-07-19 13:45
momi.php
5.51
KB
-rw-r--r--
2024-02-19 18:18
ms-blogs.php
24.58
KB
-rwxr-xr-x
2021-01-03 21:11
ms-default-constants.php
4.6
KB
-rwxr-xr-x
2021-01-03 21:11
ms-default-filters.php
6.34
KB
-rwxr-xr-x
2021-01-03 21:11
ms-deprecated.php
20.63
KB
-rwxr-xr-x
2021-07-19 13:45
ms-files.php
2.58
KB
-rwxr-xr-x
2020-06-22 14:07
ms-functions.php
91.7
KB
-rwxr-xr-x
2021-07-19 13:45
ms-load.php
19.32
KB
-rwxr-xr-x
2021-01-03 21:11
ms-network.php
3.58
KB
-rwxr-xr-x
2021-01-03 21:11
ms-settings.php
4.03
KB
-rwxr-xr-x
2021-01-03 21:11
ms-site.php
42.49
KB
-rwxr-xr-x
2021-07-19 13:45
nav-menu-template.php
22.75
KB
-rwxr-xr-x
2021-07-19 13:45
nav-menu.php
41.11
KB
-rwxr-xr-x
2021-07-19 13:45
option.php
72.82
KB
-rwxr-xr-x
2021-07-19 13:45
pluggable-deprecated.php
6.12
KB
-rwxr-xr-x
2020-06-22 14:07
pluggable.php
101.12
KB
-rwxr-xr-x
2022-10-18 07:22
plugin.php
31.73
KB
-rwxr-xr-x
2021-07-19 13:45
post-formats.php
6.91
KB
-rwxr-xr-x
2021-07-19 13:45
post-template.php
63.27
KB
-rwxr-xr-x
2022-08-31 02:18
post-thumbnail-template.php
9.13
KB
-rwxr-xr-x
2021-07-19 13:45
post.php
253.48
KB
-rwxr-xr-x
2022-10-18 07:22
query.php
34.95
KB
-rwxr-xr-x
2021-07-19 13:45
registration-functions.php
200
B
-rwxr-xr-x
2021-01-03 21:11
registration.php
200
B
-rwxr-xr-x
2021-01-03 21:11
rest-api.php
90.78
KB
-rwxr-xr-x
2021-07-19 13:45
revision.php
21.51
KB
-rwxr-xr-x
2021-01-03 21:11
rewrite.php
18.76
KB
-rwxr-xr-x
2021-07-19 13:45
robots-template.php
5.05
KB
-rwxr-xr-x
2021-07-19 13:45
rss-functions.php
255
B
-rwxr-xr-x
2021-01-03 21:11
rss.php
22.44
KB
-rwxr-xr-x
2021-07-19 13:45
script-loader.php
95.91
KB
-rwxr-xr-x
2022-03-11 02:25
session.php
258
B
-rwxr-xr-x
2020-06-22 14:07
shortcodes.php
20.95
KB
-rwxr-xr-x
2021-07-19 13:45
sitemaps.php
3.16
KB
-rwxr-xr-x
2021-01-03 21:11
spl-autoload-compat.php
441
B
-rwxr-xr-x
2021-01-03 21:11
taxonomy.php
162
KB
-rwxr-xr-x
2021-07-19 13:45
template-loader.php
2.94
KB
-rwxr-xr-x
2021-01-03 21:11
template.php
21.02
KB
-rwxr-xr-x
2021-01-03 21:11
theme.php
122.14
KB
-rwxr-xr-x
2021-07-19 13:45
update.php
25.83
KB
-rwxr-xr-x
2021-07-19 13:45
user.php
144.05
KB
-rwxr-xr-x
2021-07-19 13:45
vars.php
5.68
KB
-rwxr-xr-x
2021-01-03 21:11
version.php
766
B
-rwxr-xr-x
2023-05-17 05:50
widgets.php
59.02
KB
-rwxr-xr-x
2022-10-18 07:22
wlwmanifest.xml
1.02
KB
-rwxr-xr-x
2020-06-22 14:07
wp-db.php
103.61
KB
-rwxr-xr-x
2021-07-19 13:45
wp-diff.php
647
B
-rwxr-xr-x
2020-06-22 14:07
Save
Rename
<?php /** * Object Cache API: WP_Object_Cache class * * @package WordPress * @subpackage Cache * @since 5.4.0 */ /** * Core class that implements an object cache. * * The WordPress Object Cache is used to save on trips to the database. The * Object Cache stores all of the cache data to memory and makes the cache * contents available by using a key, which is used to name and later retrieve * the cache contents. * * The Object Cache can be replaced by other caching mechanisms by placing files * in the wp-content folder which is looked at in wp-settings. If that file * exists, then this file will not be included. * * @since 2.0.0 */ class WP_Object_Cache { /** * Holds the cached objects. * * @since 2.0.0 * @var array */ private $cache = array(); /** * The amount of times the cache data was already stored in the cache. * * @since 2.5.0 * @var int */ public $cache_hits = 0; /** * Amount of times the cache did not have the request in cache. * * @since 2.0.0 * @var int */ public $cache_misses = 0; /** * List of global cache groups. * * @since 3.0.0 * @var array */ protected $global_groups = array(); /** * The blog prefix to prepend to keys in non-global groups. * * @since 3.5.0 * @var string */ private $blog_prefix; /** * Holds the value of is_multisite(). * * @since 3.5.0 * @var bool */ private $multisite; /** * Sets up object properties; PHP 5 style constructor. * * @since 2.0.8 */ public function __construct() { $this->multisite = is_multisite(); $this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : ''; } /** * Makes private properties readable for backward compatibility. * * @since 4.0.0 * * @param string $name Property to get. * @return mixed Property. */ public function __get( $name ) { return $this->$name; } /** * Makes private properties settable for backward compatibility. * * @since 4.0.0 * * @param string $name Property to set. * @param mixed $value Property value. * @return mixed Newly-set property. */ public function __set( $name, $value ) { return $this->$name = $value; } /** * Makes private properties checkable for backward compatibility. * * @since 4.0.0 * * @param string $name Property to check if set. * @return bool Whether the property is set. */ public function __isset( $name ) { return isset( $this->$name ); } /** * Makes private properties un-settable for backward compatibility. * * @since 4.0.0 * * @param string $name Property to unset. */ public function __unset( $name ) { unset( $this->$name ); } /** * Adds data to the cache if it doesn't already exist. * * @since 2.0.0 * * @uses WP_Object_Cache::_exists() Checks to see if the cache already has data. * @uses WP_Object_Cache::set() Sets the data after the checking the cache * contents existence. * * @param int|string $key What to call the contents in the cache. * @param mixed $data The contents to store in the cache. * @param string $group Optional. Where to group the cache contents. Default 'default'. * @param int $expire Optional. When to expire the cache contents. Default 0 (no expiration). * @return bool True on success, false if cache key and group already exist. */ public function add( $key, $data, $group = 'default', $expire = 0 ) { if ( wp_suspend_cache_addition() ) { return false; } if ( empty( $group ) ) { $group = 'default'; } $id = $key; if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $id = $this->blog_prefix . $key; } if ( $this->_exists( $id, $group ) ) { return false; } return $this->set( $key, $data, $group, (int) $expire ); } /** * Sets the list of global cache groups. * * @since 3.0.0 * * @param string|string[] $groups List of groups that are global. */ public function add_global_groups( $groups ) { $groups = (array) $groups; $groups = array_fill_keys( $groups, true ); $this->global_groups = array_merge( $this->global_groups, $groups ); } /** * Decrements numeric cache item's value. * * @since 3.3.0 * * @param int|string $key The cache key to decrement. * @param int $offset Optional. The amount by which to decrement the item's value. Default 1. * @param string $group Optional. The group the key is in. Default 'default'. * @return int|false The item's new value on success, false on failure. */ public function decr( $key, $offset = 1, $group = 'default' ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( ! $this->_exists( $key, $group ) ) { return false; } if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) { $this->cache[ $group ][ $key ] = 0; } $offset = (int) $offset; $this->cache[ $group ][ $key ] -= $offset; if ( $this->cache[ $group ][ $key ] < 0 ) { $this->cache[ $group ][ $key ] = 0; } return $this->cache[ $group ][ $key ]; } /** * Removes the contents of the cache key in the group. * * If the cache key does not exist in the group, then nothing will happen. * * @since 2.0.0 * * @param int|string $key What the contents in the cache are called. * @param string $group Optional. Where the cache contents are grouped. Default 'default'. * @param bool $deprecated Optional. Unused. Default false. * @return bool False if the contents weren't deleted and true on success. */ public function delete( $key, $group = 'default', $deprecated = false ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( ! $this->_exists( $key, $group ) ) { return false; } unset( $this->cache[ $group ][ $key ] ); return true; } /** * Clears the object cache of all data. * * @since 2.0.0 * * @return true Always returns true. */ public function flush() { $this->cache = array(); return true; } /** * Retrieves the cache contents, if it exists. * * The contents will be first attempted to be retrieved by searching by the * key in the cache group. If the cache is hit (success) then the contents * are returned. * * On failure, the number of cache misses will be incremented. * * @since 2.0.0 * * @param int|string $key The key under which the cache contents are stored. * @param string $group Optional. Where the cache contents are grouped. Default 'default'. * @param bool $force Optional. Unused. Whether to force an update of the local cache * from the persistent cache. Default false. * @param bool $found Optional. Whether the key was found in the cache (passed by reference). * Disambiguates a return of false, a storable value. Default null. * @return mixed|false The cache contents on success, false on failure to retrieve contents. */ public function get( $key, $group = 'default', $force = false, &$found = null ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( $this->_exists( $key, $group ) ) { $found = true; $this->cache_hits += 1; if ( is_object( $this->cache[ $group ][ $key ] ) ) { return clone $this->cache[ $group ][ $key ]; } else { return $this->cache[ $group ][ $key ]; } } $found = false; $this->cache_misses += 1; return false; } /** * Retrieves multiple values from the cache in one call. * * @since 5.5.0 * * @param array $keys Array of keys under which the cache contents are stored. * @param string $group Optional. Where the cache contents are grouped. Default 'default'. * @param bool $force Optional. Whether to force an update of the local cache * from the persistent cache. Default false. * @return array Array of values organized into groups. */ public function get_multiple( $keys, $group = 'default', $force = false ) { $values = array(); foreach ( $keys as $key ) { $values[ $key ] = $this->get( $key, $group, $force ); } return $values; } /** * Increments numeric cache item's value. * * @since 3.3.0 * * @param int|string $key The cache key to increment * @param int $offset Optional. The amount by which to increment the item's value. Default 1. * @param string $group Optional. The group the key is in. Default 'default'. * @return int|false The item's new value on success, false on failure. */ public function incr( $key, $offset = 1, $group = 'default' ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( ! $this->_exists( $key, $group ) ) { return false; } if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) { $this->cache[ $group ][ $key ] = 0; } $offset = (int) $offset; $this->cache[ $group ][ $key ] += $offset; if ( $this->cache[ $group ][ $key ] < 0 ) { $this->cache[ $group ][ $key ] = 0; } return $this->cache[ $group ][ $key ]; } /** * Replaces the contents in the cache, if contents already exist. * * @since 2.0.0 * * @see WP_Object_Cache::set() * * @param int|string $key What to call the contents in the cache. * @param mixed $data The contents to store in the cache. * @param string $group Optional. Where to group the cache contents. Default 'default'. * @param int $expire Optional. When to expire the cache contents. Default 0 (no expiration). * @return bool False if not exists, true if contents were replaced. */ public function replace( $key, $data, $group = 'default', $expire = 0 ) { if ( empty( $group ) ) { $group = 'default'; } $id = $key; if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $id = $this->blog_prefix . $key; } if ( ! $this->_exists( $id, $group ) ) { return false; } return $this->set( $key, $data, $group, (int) $expire ); } /** * Resets cache keys. * * @since 3.0.0 * * @deprecated 3.5.0 Use switch_to_blog() * @see switch_to_blog() */ public function reset() { _deprecated_function( __FUNCTION__, '3.5.0', 'switch_to_blog()' ); // Clear out non-global caches since the blog ID has changed. foreach ( array_keys( $this->cache ) as $group ) { if ( ! isset( $this->global_groups[ $group ] ) ) { unset( $this->cache[ $group ] ); } } } /** * Sets the data contents into the cache. * * The cache contents are grouped by the $group parameter followed by the * $key. This allows for duplicate IDs in unique groups. Therefore, naming of * the group should be used with care and should follow normal function * naming guidelines outside of core WordPress usage. * * The $expire parameter is not used, because the cache will automatically * expire for each time a page is accessed and PHP finishes. The method is * more for cache plugins which use files. * * @since 2.0.0 * * @param int|string $key What to call the contents in the cache. * @param mixed $data The contents to store in the cache. * @param string $group Optional. Where to group the cache contents. Default 'default'. * @param int $expire Not Used. * @return true Always returns true. */ public function set( $key, $data, $group = 'default', $expire = 0 ) { if ( empty( $group ) ) { $group = 'default'; } if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) { $key = $this->blog_prefix . $key; } if ( is_object( $data ) ) { $data = clone $data; } $this->cache[ $group ][ $key ] = $data; return true; } /** * Echoes the stats of the caching. * * Gives the cache hits, and cache misses. Also prints every cached group, * key and the data. * * @since 2.0.0 */ public function stats() { echo '<p>'; echo "<strong>Cache Hits:</strong> {$this->cache_hits}<br />"; echo "<strong>Cache Misses:</strong> {$this->cache_misses}<br />"; echo '</p>'; echo '<ul>'; foreach ( $this->cache as $group => $cache ) { echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>'; } echo '</ul>'; } /** * Switches the internal blog ID. * * This changes the blog ID used to create keys in blog specific groups. * * @since 3.5.0 * * @param int $blog_id Blog ID. */ public function switch_to_blog( $blog_id ) { $blog_id = (int) $blog_id; $this->blog_prefix = $this->multisite ? $blog_id . ':' : ''; } /** * Serves as a utility function to determine whether a key exists in the cache. * * @since 3.4.0 * * @param int|string $key Cache key to check for existence. * @param string $group Cache group for the key existence check. * @return bool Whether the key exists in the cache for the given group. */ protected function _exists( $key, $group ) { return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) ); } }