aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-08 16:28:00 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-08 16:28:00 +0000
commitb24464ac9d6bd12b78740197531b582e0fdcd5d4 (patch)
treeff39b50b2e4c820a4d5353b85b2a73c0e5ebed25 /engine
parente1f39489ccc7ce2883882c3fe78bd54a388b92a8 (diff)
downloadelgg-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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php66
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