From 1124c6e9a16cdc5b9f7d31499faefbccaccdab7a Mon Sep 17 00:00:00 2001 From: icewing Date: Mon, 9 Jun 2008 17:16:54 +0000 Subject: Marcus Povey * Caching complete git-svn-id: https://code.elgg.org/elgg/trunk@843 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 2 +- engine/lib/objects.php | 2 +- engine/lib/sites.php | 2 +- engine/lib/users.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engine') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index cf0e544b6..f95993dcb 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -724,7 +724,7 @@ $guid = (int)$guid; if (isset($ENTITY_CACHE[$guid])) - return $ENTITY_CACHE[$guid]; + if ($ENTITY_CACHE[$guid]->isFullyLoaded()) return $ENTITY_CACHE[$guid]; return false; } diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 7ade3b475..925cf6c88 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -196,7 +196,7 @@ $guid = (int)$guid; $row = retrieve_cached_entity_row($guid); - if ($row->isFullyLoaded()) + if ($row) { // We have already cached this object, so retrieve its value from the cache if ($CONFIG->debug) diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 4aace3f47..f4478445a 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -228,7 +228,7 @@ $guid = (int)$guid; $row = retrieve_cached_entity_row($guid); - if ($row->isFullyLoaded()) + if ($row) { // We have already cached this object, so retrieve its value from the cache if ($CONFIG->debug) diff --git a/engine/lib/users.php b/engine/lib/users.php index d494cfb7c..cece8b91d 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -317,7 +317,7 @@ global $CONFIG; $row = retrieve_cached_entity_row($guid); - if ($row->isFullyLoaded()) + if ($row) { // We have already cached this object, so retrieve its value from the cache if ($CONFIG->debug) -- cgit v1.2.3