From a1210761eb8b59b4f1a3dd76724b5405bc5580f4 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 31 Mar 2018 22:10:13 -0600 Subject: [PATCH] Clear the token cache when creating upstreams Otherwise we'll flood ourselves with token errors in the backend --- src/api/admin/AdminUpstreamService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/admin/AdminUpstreamService.ts b/src/api/admin/AdminUpstreamService.ts index 5c9d994..19d6f13 100644 --- a/src/api/admin/AdminUpstreamService.ts +++ b/src/api/admin/AdminUpstreamService.ts @@ -1,6 +1,6 @@ import { GET, Path, POST, QueryParam } from "typescript-rest"; import { AdminService } from "./AdminService"; -import { Cache, CACHE_UPSTREAM } from "../../MemoryCache"; +import { Cache, CACHE_SCALAR_ACCOUNTS, CACHE_UPSTREAM } from "../../MemoryCache"; import Upstream from "../../db/models/Upstream"; import { LogService } from "matrix-js-snippets"; @@ -54,6 +54,7 @@ export class AdminUpstreamService { LogService.info("AdminUpstreamService", userId + " created a new upstream"); Cache.for(CACHE_UPSTREAM).clear(); + Cache.for(CACHE_SCALAR_ACCOUNTS).clear(); return this.mapUpstream(upstream); }