Commit 32d63780 authored by tim.plunkett's avatar tim.plunkett
Browse files

Fix calls to cache_get()/cache_set().

parent 12d40b40
......@@ -137,7 +137,7 @@ function views_cache_set($cid, $data, $use_language = FALSE) {
$cid .= ':' . $language->language;
}
cache_set($cid, $data, 'cache_views');
cache('cache_views')->set($cid, $data);
}
/**
......@@ -160,5 +160,5 @@ function views_cache_get($cid, $use_language = FALSE) {
$cid .= ':' . $language->language;
}
return cache_get($cid, 'cache_views');
return cache('cache_views')->get($cid);
}
......@@ -94,12 +94,12 @@ function cache_set($type) {
'total_rows' => isset($this->view->total_rows) ? $this->view->total_rows : 0,
'current_page' => $this->view->get_current_page(),
);
cache_set($this->get_results_key(), $data, $this->table, $this->cache_set_expire($type));
cache($this->table)->set($this->get_results_key(), $data, $this->cache_set_expire($type));
break;
case 'output':
$this->gather_headers();
$this->storage['output'] = $this->view->display_handler->output;
cache_set($this->get_output_key(), $this->storage, $this->table, $this->cache_set_expire($type));
cache($this->table)->set($this->get_results_key(), $this->storage, $this->cache_set_expire($type));
break;
}
}
......@@ -119,7 +119,7 @@ function cache_get($type) {
case 'results':
// Values to set: $view->result, $view->total_rows, $view->execute_time,
// $view->current_page.
if ($cache = cache_get($this->get_results_key(), $this->table)) {
if ($cache = cache($this->table)->get($this->get_results_key())) {
if (!$cutoff || $cache->created > $cutoff) {
$this->view->result = $cache->data['result'];
$this->view->total_rows = $cache->data['total_rows'];
......@@ -130,7 +130,7 @@ function cache_get($type) {
}
return FALSE;
case 'output':
if ($cache = cache_get($this->get_output_key(), $this->table)) {
if ($cache = cache($this->table)->get($this->get_results_key())) {
if (!$cutoff || $cache->created > $cutoff) {
$this->storage = $cache->data;
$this->view->display_handler->output = $cache->data['output'];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment