Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Redis Object Cache
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
WP Plugins
Redis Object Cache
Commits
aa45c52b
Commit
aa45c52b
authored
11 years ago
by
Eric Mann
Browse files
Options
Downloads
Plain Diff
Merge pull request
#3
from ethitter/master
WP Compatibility Fixes
parents
6539cce2
80f1df74
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object-cache.php
+26
-2
26 additions, 2 deletions
object-cache.php
with
26 additions
and
2 deletions
object-cache.php
+
26
−
2
View file @
aa45c52b
...
...
@@ -780,7 +780,7 @@ class WP_Object_Cache {
* @param null $persistent_id To create an instance that persists between requests, use persistent_id to specify a unique ID for the instance.
*/
public
function
__construct
()
{
includ
e
'predis/autoload.php'
;
require_onc
e
'predis/autoload.php'
;
$this
->
redis
=
new
Predis\Client
(
''
);
...
...
@@ -1010,4 +1010,28 @@ class WP_Object_Cache {
return
false
;
}
}
/**
* Sets the list of global groups.
*
* @param array $groups List of groups that are global.
*/
function
add_global_groups
(
$groups
)
{
$groups
=
(
array
)
$groups
;
$groups
=
array_fill_keys
(
$groups
,
true
);
$this
->
global_groups
=
array_merge
(
$this
->
global_groups
,
$groups
);
}
/**
* Sets the list of groups not to be cached by Redis.
*
* @param array $groups List of groups that are to be ignored.
*/
function
add_non_persistent_groups
(
$groups
)
{
$groups
=
(
array
)
$groups
;
$groups
=
array_fill_keys
(
$groups
,
true
);
$this
->
no_redis_groups
=
array_merge
(
$this
->
no_redis_groups
,
$groups
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment