<commit_before>CREATE TABLE IF NOT EXISTS `syncDownloadCache` (
  `hash` char(32) NOT NULL,
  `userID` int(10) unsigned NOT NULL,
  `lastsync` varchar(20) NOT NULL,
  `xmldata` longblob NOT NULL,
  `lastUsed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE EVENT purgeCache ON SCHEDULE EVERY 24 HOUR DO DELETE FROM syncDownloadCache WHERE lastUsed<NOW() - INTERVAL 2 WEEK;<commit_msg>Add an index on the download cache table, and purge more frequently<commit_after>CREATE TABLE `syncDownloadCache` (
  `hash` char(32) NOT NULL,
  `userID` int(10) unsigned NOT NULL,
  `lastsync` varchar(20) NOT NULL,
  `xmldata` longblob NOT NULL,
  `lastUsed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`hash`),
  KEY `lastUsed` (`lastUsed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE EVENT purgeCache ON SCHEDULE EVERY 8 HOUR DO DELETE FROM syncDownloadCache WHERE lastUsed<NOW() - INTERVAL 2 WEEK;
{'fraction_non_alphanumeric': 0.09053497942386832, 'fraction_numerical': 0.01954732510288066, 'mean_word_length': 5.486666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3657003', 'n_tokens_mistral': 349, 'n_tokens_neox': 313, 'n_words': 114}