<?xml version="1.0" encoding="iso-8859-1" ?>

<table>
  <base>CRM/Core</base>
  <class>Cache</class>
  <name>civicrm_cache</name>
  <comment>Table to cache items for civicrm components.</comment>
  <add>2.1</add>
  <field>
    <name>id</name>
    <title>Cache ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>Unique table ID</comment>
    <html>
      <type>Number</type>
    </html>
    <add>2.1</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>group_name</name>
    <title>Group Name</title>
    <type>varchar</type>
    <length>32</length>
    <required>true</required>
    <comment>group name for cache element, useful in cleaning cache elements</comment>
    <add>2.1</add>
  </field>
  <field>
    <name>path</name>
    <title>Path</title>
    <type>varchar</type>
    <length>255</length>
    <comment>Unique path name for cache element</comment>
    <add>2.1</add>
  </field>
  <index>
    <name>UI_group_name_path</name>
    <fieldName>group_name</fieldName>
    <fieldName>path</fieldName>
    <unique>true</unique>
    <add>5.61</add>
  </index>
  <index>
    <name>UI_group_path_date</name>
    <fieldName>group_name</fieldName>
    <fieldName>path</fieldName>
    <fieldName>created_date</fieldName>
    <unique>true</unique>
    <add>4.2</add>
    <drop>5.61</drop>
  </index>
  <field>
    <name>data</name>
    <title>Data</title>
    <type>longtext</type>
    <comment>data associated with this path</comment>
    <add>2.1</add>
  </field>
  <field>
    <name>component_id</name>
    <title>Component ID</title>
    <type>int unsigned</type>
    <comment>Component that this menu item belongs to</comment>
    <add>2.1</add>
    <pseudoconstant>
      <table>civicrm_component</table>
      <keyColumn>id</keyColumn>
      <labelColumn>name</labelColumn>
    </pseudoconstant>
    <html>
      <type>Select</type>
      <label>Component</label>
    </html>
  </field>
  <foreignKey>
    <name>component_id</name>
    <table>civicrm_component</table>
    <key>id</key>
    <add>2.1</add>
  </foreignKey>
  <field>
    <name>created_date</name>
    <title>Created Date</title>
    <type>timestamp</type>
    <default>CURRENT_TIMESTAMP</default>
    <comment>When was the cache item created</comment>
    <add>2.1</add>
  </field>
  <field>
    <name>expired_date</name>
    <title>Expired Date</title>
    <type>timestamp</type>
    <default>NULL</default>
    <required>false</required>
    <comment>When should the cache item expire</comment>
    <add>2.1</add>
  </field>
  <index>
    <name>index_expired_date</name>
    <fieldName>expired_date</fieldName>
    <add>5.61</add>
  </index>
</table>
