mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
disable TypeORM query cache by default
This commit is contained in:
@@ -115,8 +115,10 @@ db:
|
||||
user: postgres
|
||||
pass: ci
|
||||
|
||||
# Whether disable Caching queries
|
||||
#disableCache: true
|
||||
# If false, then query results will be cached in redis.
|
||||
# If true (default), then queries will not be cached.
|
||||
# This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior.
|
||||
#disableCache: false
|
||||
|
||||
# Extra Connection options
|
||||
#extra:
|
||||
|
||||
@@ -57,8 +57,10 @@ db:
|
||||
user: postgres
|
||||
pass: postgres
|
||||
|
||||
# Whether disable Caching queries
|
||||
#disableCache: true
|
||||
# If false, then query results will be cached in redis.
|
||||
# If true (default), then queries will not be cached.
|
||||
# This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior.
|
||||
#disableCache: false
|
||||
|
||||
# Extra Connection options
|
||||
#extra:
|
||||
|
||||
@@ -118,8 +118,10 @@ db:
|
||||
user: example-misskey-user
|
||||
pass: example-misskey-pass
|
||||
|
||||
# Whether disable Caching queries
|
||||
#disableCache: true
|
||||
# If false, then query results will be cached in redis.
|
||||
# If true (default), then queries will not be cached.
|
||||
# This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior.
|
||||
#disableCache: false
|
||||
|
||||
# Extra Connection options
|
||||
#extra:
|
||||
|
||||
@@ -121,8 +121,12 @@ db:
|
||||
user: sharkey
|
||||
pass: example-misskey-pass
|
||||
|
||||
# Whether disable Caching queries
|
||||
#disableCache: true
|
||||
# If false, then query results will be cached in redis.
|
||||
# If true (default), then queries will not be cached.
|
||||
# This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior.
|
||||
#disableCache: false
|
||||
|
||||
#
|
||||
|
||||
# Extra Connection options
|
||||
#extra:
|
||||
|
||||
@@ -306,7 +306,7 @@ export function createPostgresDataSource(config: Config) {
|
||||
} : {}),
|
||||
synchronize: process.env.NODE_ENV === 'test',
|
||||
dropSchema: process.env.NODE_ENV === 'test',
|
||||
cache: !config.db.disableCache && process.env.NODE_ENV !== 'test' ? { // dbをcloseしても何故かredisのコネクションが内部的に残り続けるようで、テストの際に支障が出るため無効にする(キャッシュも含めてテストしたいため本当は有効にしたいが...)
|
||||
cache: config.db.disableCache === false && process.env.NODE_ENV !== 'test' ? { // dbをcloseしても何故かredisのコネクションが内部的に残り続けるようで、テストの際に支障が出るため無効にする(キャッシュも含めてテストしたいため本当は有効にしたいが...)
|
||||
type: 'ioredis',
|
||||
options: {
|
||||
...config.redis,
|
||||
|
||||
Reference in New Issue
Block a user