Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
Redis Page Cache
Commits
4891629b
Commit
4891629b
authored
Feb 25, 2014
by
Erick Hitter
Browse files
Remove relative requires, passing full paths instead.
parent
12611128
Changes
1
Hide whitespace changes
Inline
Side-by-side
index-wp-redis.php
View file @
4891629b
...
...
@@ -80,7 +80,7 @@ try {
$redis
->
del
(
$redis_key
);
require
'
.
/wp-blog-header.php'
;
require
dirname
(
__FILE__
)
.
'/wp-blog-header.php'
;
$unlimited
=
get_option
(
'wp-redis-cache-debug'
,
false
);
$seconds_cache_redis
=
get_option
(
'wp-redis-cache-seconds'
,
43200
);
...
...
@@ -107,7 +107,7 @@ try {
if
(
!
$is_post
&&
!
$logged_in
)
{
ob_start
();
require
'
.
/wp-blog-header.php'
;
require
dirname
(
__FILE__
)
.
'/wp-blog-header.php'
;
$html_of_page
=
trim
(
ob_get_clean
()
);
echo
$html_of_page
;
...
...
@@ -125,16 +125,16 @@ try {
}
}
}
else
{
//either the user is logged in, or is posting a comment, show them uncached
require
'
.
/wp-blog-header.php'
;
require
dirname
(
__FILE__
)
.
'/wp-blog-header.php'
;
}
}
elseif
(
$_SERVER
[
'REMOTE_ADDR'
]
!=
$server_ip
&&
true
===
strstr
(
$current_url
,
'preview=true'
)
)
{
require
'
.
/wp-blog-header.php'
;
require
dirname
(
__FILE__
)
.
'/wp-blog-header.php'
;
}
// else { // This is what your server should get if no cache exists //deprecated, as the ob_start() is cleaner
// require '
.
/wp-blog-header.php';
// require
dirname( __FILE__ ) .
'/wp-blog-header.php';
// }
}
catch
(
Exception
$e
)
{
//require '
.
/wp-blog-header.php';
//require
dirname( __FILE__ ) .
'/wp-blog-header.php';
echo
"something went wrong"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment