Adding to the config so we can pick what kind of caching

This commit is contained in:
Tanya Byrne
2020-08-19 19:10:57 +01:00
parent 2da9199e18
commit a040b021ce
3 changed files with 8 additions and 1 deletions

View File

@@ -32,7 +32,6 @@ const defaults = {
},
rateLimits: {
RATE_LIMIT_TYPE: 'redis',
CACHE_TYPE: 'redis',
CONSUMED_POINTS_LIMIT: 5,
CONSUMED_RESET_DURATION: 1,
EXEC_EVENLY: true,
@@ -40,6 +39,9 @@ const defaults = {
INMEMORY_BLOCK_CONSUMED: 200,
INMEMEMORY_BLOCK_DURATION: 30,
},
caching: {
CACHE_TYPE: 'redis',
},
security: {
KEY: uuidv4(),
SECRET: nanoid(32),

View File

@@ -6,6 +6,7 @@
* checkPeriod is the amount of seconds for the
* autodelete to wait before checking
* if cache needs to be deleted.
* Have wrapped node cache so we can extend if needed
*/
import NodeCache from 'node-cache';