Skip to content

Commit c362db6

Browse files
committed
nits
1 parent 54815f8 commit c362db6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Controllers/SchemaCache.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ export default class SchemaCache {
1010
}
1111

1212
getAllClasses() {
13-
if (this.ttl <= 0) {
13+
if (!this.ttl) {
1414
return Promise.resolve(null);
1515
}
1616
return this.cache.get(SCHEMA_CACHE_PREFIX+MAIN_SCHEMA);
1717
}
1818

1919
setAllClasses(schema) {
20-
if (this.ttl <= 0) {
20+
if (!this.ttl) {
2121
return Promise.resolve(null);
2222
}
2323
this.cache.put(SCHEMA_CACHE_PREFIX+MAIN_SCHEMA, schema, this.ttl);
2424
}
2525

2626
setOneSchema(className, schema) {
27-
if (this.ttl <= 0) {
27+
if (!this.ttl) {
2828
return Promise.resolve(null);
2929
}
3030
this.cache.put(SCHEMA_CACHE_PREFIX+className, schema, this.ttl);
3131
}
3232

3333
getOneSchema(className) {
34-
if (this.ttl <= 0) {
34+
if (!this.ttl) {
3535
return Promise.resolve(null);
3636
}
3737
return this.cache.get(SCHEMA_CACHE_PREFIX+className);

src/ParseServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class ParseServer {
136136
expireInactiveSessions = true,
137137
verbose = false,
138138
revokeSessionOnPasswordReset = true,
139-
schemaCacheTTL = -1, // -1 = no cache
139+
schemaCacheTTL = 0, // 0 = no cache
140140
__indexBuildCompletionCallbackForTests = () => {},
141141
}) {
142142
// Initialize the node client SDK automatically

src/cli/cli-definitions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export default {
200200
},
201201
"schemaCacheTTL": {
202202
env: "PARSE_SERVER_SCHEMA_CACHE_TTL",
203-
help: "The TTL for caching the schema for optimizing read/write operations. You should put a long TTL when your DB is in production. default to -1; disabled.",
203+
help: "The TTL for caching the schema for optimizing read/write operations. You should put a long TTL when your DB is in production. default to 0; disabled.",
204204
action: numberParser("schemaCacheTTL"),
205205
}
206206
};

0 commit comments

Comments
 (0)