CREATE TABLE IF NOT EXISTS `luminous_cache`
(
  id INT NOT NULL AUTO_INCREMENT,
  -- this is the cache ID, it's the hex representation of an MD5sum.
  cache_id CHAR(32) NOT NULL UNIQUE,
  -- cached output
  output MEDIUMTEXT NOT NULL,
 -- date of insertion
  insert_date INT NOT NULL,
 -- date of most recent hit
  hit_date INT NOT NULL,
 PRIMARY KEY (id),
 -- we create an index on cache ID because it's what's most interesting, but in reality, we don't
 -- usually need to worry about many bytes. 6 chars gives us 3 bytes,
 -- or roughly 16 million combinations
 INDEX(cache_id(6)),
 INDEX(hit_date)
) ENGINE = MYISAM;

-- we explictly set MyISAM because at least on my Xampp installation, innodb is painfully slow