drupal_get_schema_unprocessed('system', 'cache') doesn't work anymore, the cache table isn't defined in the schema anymore. For some reason they've moved it over to system_schema_cache_8007(). Calling that seems to work fine, but I'm not sure if we really want to use that as the table definition. Do we create a new schema?

Comments

rdeboer’s picture

Hi Karl,
Views D8 uses that function in its views.install file:

/**
 * Provide an initial schema.
 *
 * @see UpdateModuleHandler::enable().
 */
function views_schema_0() {
  module_load_install('system');
  // Add the cache_views_info and cache_views_results tables.
  $cache_schema = system_schema_cache_8007();
  $schema['cache_views_info'] = $cache_schema;
  $schema['cache_views_results'] = $cache_schema;
  return $schema;
}

If it's good enough for Views, then it's good enough for Session Cache, I reckon.

Rik

rdeboer’s picture

Assigned: kscheirer » rdeboer
Status: Active » Fixed

Checked into 8.x-1.x-dev this code:

function session_cache_schema() {
  // Use the generic cache table for caching things not separated out into
  // their own tables. Contrib modules may also use this to store cached items.
  $schema['cache_session_cache'] = system_schema_cache_8007();
  $schema['cache_session_cache']['description'] = 'Cache table for Session Cache API';
  return $schema;
}
kscheirer’s picture

Works for me! installs and the table is created.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.