Commit 954c0870 authored by damiankloip's avatar damiankloip Committed by tim.plunkett
Browse files

Fixed CachePluginBase. wrong cache table name and instanceof condition

parent 54b5ede1
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
namespace Drupal\views\Plugin\views\cache; namespace Drupal\views\Plugin\views\cache;
use Drupal\views\Plugin\views\Plugin; use Drupal\views\Plugin\views\Plugin;
use Drupal\Core\Database\Query\Select;
/** /**
* @defgroup views_cache_plugins Views cache plugins * @defgroup views_cache_plugins Views cache plugins
...@@ -29,7 +30,7 @@ abstract class CachePluginBase extends Plugin { ...@@ -29,7 +30,7 @@ abstract class CachePluginBase extends Plugin {
/** /**
* What table to store data in. * What table to store data in.
*/ */
var $table = 'cache_views_data'; var $table = 'views_data';
/** /**
* Stores the cache id used for the results cache, once get_results_key() got * Stores the cache id used for the results cache, once get_results_key() got
...@@ -277,7 +278,7 @@ function get_results_key() { ...@@ -277,7 +278,7 @@ function get_results_key() {
foreach (array('query', 'count_query') as $index) { foreach (array('query', 'count_query') as $index) {
// If the default query back-end is used generate SQL query strings from // If the default query back-end is used generate SQL query strings from
// the query objects. // the query objects.
if ($build_info[$index] instanceof Drupal\Core\Database\Query\Select) { if ($build_info[$index] instanceof Select) {
$query = clone $build_info[$index]; $query = clone $build_info[$index];
$query->preExecute(); $query->preExecute();
$build_info[$index] = (string)$query; $build_info[$index] = (string)$query;
......
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