-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from EigenExplorer/dev
Dev to Main v0.3.7
- Loading branch information
Showing
13 changed files
with
222 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
import { refreshAuthStore } from './authMiddleware' | ||
import NodeCache from 'node-cache' | ||
|
||
/** | ||
* Init cache that stores `accessLevel` & `accountRestricted` per api token. | ||
* On server boot, load it up with all auth data from db. | ||
* Cache that stores `accessLevel` & `accountRestricted` per API token | ||
* | ||
*/ | ||
export const authStore = new NodeCache({ stdTTL: 7 * 24 * 60 * 60 }) // 1 week | ||
refreshAuthStore() | ||
export const authStore = new NodeCache({ stdTTL: 60 * 60 }) // 1 hour | ||
|
||
/** | ||
* Init cache that collects `newRequests` per api token. | ||
* Cache that collects `newRequests` per API token | ||
* | ||
*/ | ||
export const requestsStore = new NodeCache({ stdTTL: 7 * 24 * 60 * 60 }) // 1 week | ||
export const requestsStore = new NodeCache({ stdTTL: 24 * 60 * 60 }) // 1 day |
Oops, something went wrong.