Further improvements in caching. The state of the cache is now persisted in DB. This persists the cache between server restarts.
This commit is contained in:
parent
7bcd6c60e9
commit
ef0464bbc9
8 changed files with 155 additions and 75 deletions
15
server/setup/knex/migrations/20190422084800_file_cache.js
Normal file
15
server/setup/knex/migrations/20190422084800_file_cache.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
exports.up = (knex, Promise) => (async() => {
|
||||
await knex.schema.raw('CREATE TABLE `file_cache` (\n' +
|
||||
' `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n' +
|
||||
' `type` varchar(255) NOT NULL,\n' +
|
||||
' `url` text NOT NULL,\n' +
|
||||
' `mimetype` varchar(255) DEFAULT NULL,\n' +
|
||||
' `size` int(11) DEFAULT NULL,\n' +
|
||||
' `created` timestamp NOT NULL DEFAULT current_timestamp(),\n' +
|
||||
' PRIMARY KEY (`id`),\n' +
|
||||
' KEY `url` (`url`(191))\n' +
|
||||
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;');
|
||||
})();
|
||||
|
||||
exports.down = (knex, Promise) => (async() => {
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue