You are here

function content_cache_tablename in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 6.3 content.module \content_cache_tablename()
  2. 6.2 content.module \content_cache_tablename()

Generate table name for the content cache table.

Needed because the table name changes depending on version. Because of a new database column, the content_cache table will be unusable until update 6000 runs, so the cache table will be used instead.

15 calls to content_cache_tablename()
content_clear_type_cache in ./content.module
Clear the cache of content_types; called in several places when content information is changed.
content_delete in ./content.module
Nodeapi 'delete' op.
content_delete_revision in ./content.module
Nodeapi 'delete_revision' op.
content_devel_caches in ./content.module
Implementation of hook_devel_caches. Include {cache_content} in the list of tables cleared by devel's 'empty cache'
content_flush_caches in ./content.module
Implementation of hook_flush_caches.

... See full list

File

./content.module, line 1658
Allows administrators to associate custom fields to content types.

Code

function content_cache_tablename() {
  if (variable_get('content_schema_version', -1) < 6000) {
    return 'cache';
  }
  else {
    return 'cache_content';
  }
}