Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
memcache
Commits
be4e1b91
Commit
be4e1b91
authored
Sep 26, 2011
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1131380
by das-peter: fix undefined variable.
parent
8a714b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
memcache.inc
memcache.inc
+8
-8
No files found.
memcache.inc
View file @
be4e1b91
...
...
@@ -52,7 +52,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
if
(
variable_get
(
'memcache_stampede_protection'
,
FALSE
))
{
// The process that acquires the lock will get a cache miss, all
// others will get a cache hit.
if
(
lock_acquire
(
"memcache_
$cid
:
$t
able
"
,
variable_get
(
'memcache_stampede_semaphore'
,
15
)))
{
if
(
lock_acquire
(
"memcache_
$cid
:
$t
his->bin
"
,
variable_get
(
'memcache_stampede_semaphore'
,
15
)))
{
$cache
=
FALSE
;
}
}
...
...
@@ -103,7 +103,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
// The memcache_stampede_semaphore variable was used in previous releases
// of memcache, but the max_wait variable was not, so by default divide
// the semaphore value by 3 (5 seconds).
lock_wait
(
"memcache_
$cid
:
$t
able
"
,
variable_get
(
'memcache_stampede_wait_time'
,
5
));
lock_wait
(
"memcache_
$cid
:
$t
his->bin
"
,
variable_get
(
'memcache_stampede_wait_time'
,
5
));
$cache
=
$this
->
get
(
$cid
);
}
}
...
...
@@ -245,7 +245,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
// shortest wildcard clear on the table so far. So if the shortest
// wildcard was "links:foo:", and the cid we're checking for is
// "links:bar:bar", then the key will be "links:bar:".
$wildcard_length
=
strlen
(
reset
(
array_keys
(
$this
->
wildcard_flushes
[
$t
able
])));
$wildcard_length
=
strlen
(
reset
(
array_keys
(
$this
->
wildcard_flushes
[
$t
his
->
bin
])));
$wildcard_key
=
substr
(
$cid
,
0
,
$wildcard_length
);
// Determine which lookups we need to perform to determine whether or not
...
...
@@ -255,13 +255,13 @@ class MemCacheDrupal implements DrupalCacheInterface {
// Find statically cached wildcards, and determine possibly matching
// wildcards for this cid based on a history of the lengths of past
// valid wildcard flushes in this bin.
if
(
isset
(
$wildcard_flushes
[
$t
able
][
$wildcard_key
]))
{
foreach
(
$wildcard_flushes
[
$t
able
][
$wildcard_key
]
as
$flush_length
=>
$timestamp
)
{
if
(
isset
(
$wildcard_flushes
[
$t
his
->
bin
][
$wildcard_key
]))
{
foreach
(
$wildcard_flushes
[
$t
his
->
bin
][
$wildcard_key
]
as
$flush_length
=>
$timestamp
)
{
if
(
$length
>=
$flush_length
&&
$timestamp
>=
(
$_SERVER
[
'REQUEST_TIME'
]
-
$wildcard_invalidate
))
{
$key
=
'.wildcard-'
.
substr
(
$cid
,
0
,
$flush_length
);
$wildcard
=
dmemcache_key
(
$key
,
$t
able
);
if
(
isset
(
$wildcards
[
$t
able
][
$wildcard
]))
{
$matching
[
$wildcard
]
=
$wildcards
[
$t
able
][
$wildcard
];
$wildcard
=
dmemcache_key
(
$key
,
$t
his
->
bin
);
if
(
isset
(
$wildcards
[
$t
his
->
bin
][
$wildcard
]))
{
$matching
[
$wildcard
]
=
$wildcards
[
$t
his
->
bin
][
$wildcard
];
}
else
{
$lookup
[
$wildcard
]
=
$key
;
...
...
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