Skip to content

Commit e7b1b22

Browse files
committed
build: Add migration script.
1 parent adcc2b9 commit e7b1b22

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* VPDB - Virtual Pinball Database
3+
* Copyright (C) 2019 freezy <[email protected]>
4+
*
5+
* This program is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License
7+
* as published by the Free Software Foundation; either version 2
8+
* of the License, or (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18+
*/
19+
20+
import { apiCache } from '../../app/common/api.cache';
21+
import { logger } from '../../app/common/logger';
22+
23+
/**
24+
* Clears the entire API cache.
25+
*/
26+
export async function up() {
27+
28+
// clear all caches
29+
await apiCache.invalidateAll();
30+
logger.info(null, '[migrate-19] Cache invalidated.');
31+
}

0 commit comments

Comments
 (0)