diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-04-08 16:28:00 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-04-08 16:28:00 +0000 |
commit | b24464ac9d6bd12b78740197531b582e0fdcd5d4 (patch) | |
tree | ff39b50b2e4c820a4d5353b85b2a73c0e5ebed25 | |
parent | e1f39489ccc7ce2883882c3fe78bd54a388b92a8 (diff) | |
download | elgg-b24464ac9d6bd12b78740197531b582e0fdcd5d4.tar.gz elgg-b24464ac9d6bd12b78740197531b582e0fdcd5d4.tar.bz2 |
Removed unused experimental cache functions
git-svn-id: https://code.elgg.org/elgg/trunk@3196 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/elgglib.php | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 872e95c56..81d2290f6 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -157,72 +157,6 @@ } /** - * Generate a view hash [EXPERIMENTAL]. - * - * @param string $view The view name - * @param array $vars The view parameters - * @return string The hash. - */ - function elgg_get_viewhash($view, $vars) - { - $unchanged_vars = unserialize(serialize($vars)); - - // This is a bit of a hack, but basically we have to remove things that change on each pageload - if (isset($unchanged_vars['entity']->last_action)) $unchanged_vars['entity']->last_action = 0; - if (isset($unchanged_vars['entity']->prev_last_action)) $unchanged_vars['entity']->prev_last_action = 0; - - if (isset($unchanged_vars['user']->last_action)) $unchanged_vars['user']->last_action = 0; - if (isset($unchanged_vars['user']->prev_last_action)) $unchanged_vars['user']->prev_last_action = 0; - - - return md5(current_page_url() . $view . serialize($unchanged_vars)); // This should be enough to stop artefacts - - } - - - /** - * Get a cached view based on its hash. - * - * @param string $viewhash - * @return string or false on if no cache returned. - */ - function elgg_get_cached_view($viewhash) - { - global $view_cache, $VIEW_CACHE_DISABLED, $CONFIG; - - if (($VIEW_CACHE_DISABLED) || (!$CONFIG->viewcache)) return false; - - if ((!$view_cache) && (is_memcache_available())) - $view_cache = new ElggMemcache('view_cache'); - if ($view_cache) { - - $cached_view = $view_cache->load($viewhash); - - if ($cached_view) - { - error_log("MARCUS : LOADED $view:$viewhash from cache"); - return $cached_view; - } - else - error_log("MARCUS : View $view:$viewhash not cached"); - - } - - return false; - } - - /** - * Temporarily disable view caching. - * - */ - function elgg_disable_view_cache() - { - global $VIEW_CACHE_DISABLED; - - $VIEW_CACHE_DISABLED = true; - } - - /** * Handles templating views * * @see set_template_handler |