diff --git a/README.md b/README.md index 855c756..0932181 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,16 @@ For a more functional, feature rich, better security and better performance solu > Webserver running on port 82 ## Features +- Token authentication. - Emblem upload/download with transparency checks for both BMP and GIF formats. - User config and char config saving/loading. - -## Pending -- Merchant store functionality +- Merchant store functionality. ## Contributing - Clone the repo. - Make some changes. - Upload to your repo. - Open a pull request. + +## Ideas, suggestions, bugs... +Please use the issues tab here in Github, your feedback is appreciated! \ No newline at end of file diff --git a/utils/emblem-cache-manager.ts b/utils/emblem-cache-manager.ts index 4339ea9..c7a15a6 100644 --- a/utils/emblem-cache-manager.ts +++ b/utils/emblem-cache-manager.ts @@ -6,17 +6,15 @@ import { EmblemCacheGroup } from "../models/emblemCache"; export namespace EmblemCacheManager { // Main cache const cache: EmblemCacheGroup = {}; - // Last time cache was cleaned - const cacheLastCheck = 0; // Remove cached emblems from memory if not requested in a certain time - const CACHE_REMOVAL_TIME = 15 * 1000; // 15 minutes + const CACHE_REMOVAL_TIME = 10 * 60 * 1000; // 10 minutes // Interval time to perform cleanups - const CACHE_CLEAN_INTERVAL = 60 * 1000; // 1 hour + const CACHE_CLEAN_INTERVAL = 5 * 60 * 1000; // 5 minutes /** * Initialize interval for cleaning up cache */ - export const init = ():void => { + export const init = (): void => { setInterval(() => clean(), CACHE_CLEAN_INTERVAL); }; @@ -55,10 +53,6 @@ export namespace EmblemCacheManager { */ const clean = (): void => { const now = new Date().getTime(); - - if (cacheLastCheck + CACHE_CLEAN_INTERVAL > now) - return; // Still not the time to do cleanups - const keys = Object.keys(cache); let deleted = 0;