<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="data-dictionary-object-cache">
      </a>
      16.4 Dictionary Object Cache
     </h2>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045167734048">
  </a>
  <a class="indexterm" name="idm46045167732976">
  </a>
  <p>
   The dictionary object cache is a shared global cache that stores
      previously accessed data dictionary objects in memory to enable
      object reuse and minimize disk I/O. Similar to other cache
      mechanisms used by MySQL, the dictionary object cache uses an
   <a class="link" href="glossary.html#glos_lru" title="LRU">
    LRU
   </a>
   -based eviction strategy to
      evict least recently used objects from memory.
  </p>
  <p>
   The dictionary object cache comprises cache partitions that store
      different object types. Some cache partition size limits are
      configurable, whereas others are hardcoded.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        tablespace definition cache
          partition
       </strong>
      </span>
      : Stores tablespace definition objects.
          The
      <a class="link" href="server-system-variables.html#sysvar_tablespace_definition_cache">
       <code class="literal">
        tablespace_definition_cache
       </code>
      </a>
      option sets a limit for the number of tablespace definition
          objects that can be stored in the dictionary object cache. The
          default value is 256.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        schema definition cache
          partition
       </strong>
      </span>
      : Stores schema definition objects. The
      <a class="link" href="server-system-variables.html#sysvar_schema_definition_cache">
       <code class="literal">
        schema_definition_cache
       </code>
      </a>
      option sets a limit for the number of schema definition
          objects that can be stored in the dictionary object cache. The
          default value is 256.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        table definition cache
          partition
       </strong>
      </span>
      : Stores table definition objects. The
          object limit is set to the value of
      <a class="link" href="server-system-variables.html#sysvar_max_connections">
       <code class="literal">
        max_connections
       </code>
      </a>
      , which has a
          default value of 151.
     </p>
     <p>
      The table definition cache partition exists in parallel with
          the table definition cache that is configured using the
      <a class="link" href="server-system-variables.html#sysvar_table_definition_cache">
       <code class="literal">
        table_definition_cache
       </code>
      </a>
      configuration option. Both caches store table definitions but
          serve different parts of the MySQL server. Objects in one
          cache have no dependence on the existence of objects in the
          other.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        stored program definition cache
          partition
       </strong>
      </span>
      : Stores stored program definition
          objects. The
      <a class="link" href="server-system-variables.html#sysvar_stored_program_definition_cache">
       <code class="literal">
        stored_program_definition_cache
       </code>
      </a>
      option sets a limit for the number of stored program
          definition objects that can be stored in the dictionary object
          cache. The default value is 256.
     </p>
     <p>
      The stored program definition cache partition exists in
          parallel with the stored procedure and stored function caches
          that are configured using the
      <a class="link" href="server-system-variables.html#sysvar_stored_program_cache">
       <code class="literal">
        stored_program_cache
       </code>
      </a>
      option.
     </p>
     <p>
      The
      <a class="link" href="server-system-variables.html#sysvar_stored_program_cache">
       <code class="literal">
        stored_program_cache
       </code>
      </a>
      option sets a soft upper limit for the number of cached stored
          procedures or functions per connection, and the limit is
          checked each time a connection executes a stored procedure or
          function. The stored program definition cache partition, on
          the other hand, is a shared cache that stores stored program
          definition objects for other purposes. The existence of
          objects in the stored program definition cache partition has
          no dependence on the existence of objects in the stored
          procedure cache or stored function cache, and vice versa.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        character set definition cache
          partition
       </strong>
      </span>
      : Stores character set definition objects
          and has a hardcoded object limit of 256.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        collation definition cache
          partition
       </strong>
      </span>
      : Stores collation definition objects and
          has a hardcoded object limit of 256.
     </p>
    </li>
   </ul>
  </div>
  <p>
   For information about valid values for dictionary object cache
      configuration options, refer to
   <a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
    Section 7.1.8, “Server System Variables”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
