Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
memcache
Commits
4c5d206e
Commit
4c5d206e
authored
Apr 29, 2010
by
Jeremy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push some more fixes.
parent
cd7f137f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
memcache.inc
memcache.inc
+3
-3
No files found.
memcache.inc
View file @
4c5d206e
...
...
@@ -186,7 +186,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
// Load the prefix directory.
if
(
!
isset
(
$memcached_prefixes
[
$this
->
bin
]))
{
$memcached_prefixes
[
$this
->
bin
]
=
dmemcache_get
(
'.prefixes'
,
$this
->
bin
);
if
(
$memcached_prefixes
[
$this
->
bin
]
===
FALSE
)
{
if
(
!
is_array
(
$memcached_prefixes
[
$this
->
bin
]
)
)
{
$memcached_prefixes
[
$this
->
bin
]
=
array
();
}
}
...
...
@@ -196,13 +196,13 @@ class MemCacheDrupal implements DrupalCacheInterface {
if
(
!
in_array
(
$cid
,
$memcached_prefixes
[
$this
->
bin
]))
{
// Acquire a semaphore.
$lock_key
=
dmemcache_key
(
'.prefixes.lock'
,
$this
->
bin
);
while
(
!
$mc
->
add
(
$lock_key
,
1
,
FALSE
,
10
))
{
while
(
!
dmemcache_
add
(
$lock_key
,
1
,
10
))
{
usleep
(
1000
);
}
// Get a fresh copy of the prefix directory.
$memcached_prefixes
[
$this
->
bin
]
=
dmemcache_get
(
'.prefixes'
,
$this
->
bin
);
if
(
$memcached_prefixes
[
$this
->
bin
]
===
FALSE
)
{
if
(
!
is_array
(
$memcached_prefixes
[
$this
->
bin
]
)
)
{
$memcached_prefixes
[
$this
->
bin
]
=
array
();
}
...
...
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