diff --git a/.config/example.yml b/.config/example.yml
index 503471d93..8534d3e1e 100644
--- a/.config/example.yml
+++ b/.config/example.yml
@@ -62,6 +62,9 @@ db:
user: example-misskey-user
pass: example-misskey-pass
+ # Whether disable Caching queries
+ #disableCache: true
+
# Extra Connection options
#extra:
# ssl: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8511132b..7e5f9a793 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,14 @@ npm i -g ts-node
npm run migrate
```
+11.20.4 (2019/06/13)
+--------------------
+### 🐛Fixes
+* 検索結果がループする問題を修正
+* 設定でPostgreSQLのクエリー結果のキャッシュを無効できるように
+* 「投稿内の動きのあるテキストを無効にする」だけ反応しない問題を修正
+* 特定の操作のデータベースのパフォーマンス調整
+
11.20.3 (2019/06/10)
--------------------
### 🐛Fixes
diff --git a/README.md b/README.md
index 8d7ca4b54..a2d90a3e1 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,6 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
-**Last updated:** Tue, 04 Jun 2019 04:21:06 UTC
+**Last updated:** Tue, 11 Jun 2019 01:46:06 UTC
:four_leaf_clover: Copyright
diff --git a/package.json b/package.json
index b779b4ec9..dd54c42fe 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "misskey",
"author": "syuilo ",
- "version": "11.20.3",
+ "version": "11.20.4",
"codename": "daybreak",
"repository": {
"type": "git",
diff --git a/src/client/app/common/scripts/paging.ts b/src/client/app/common/scripts/paging.ts
index c13a607e6..cf36a692d 100644
--- a/src/client/app/common/scripts/paging.ts
+++ b/src/client/app/common/scripts/paging.ts
@@ -5,6 +5,7 @@ export default (opts) => ({
return {
items: [],
queue: [],
+ offset: 0,
fetching: true,
moreFetching: false,
inited: false,
@@ -80,6 +81,7 @@ export default (opts) => ({
this.items = x;
this.more = false;
}
+ this.offset = x.length;
this.inited = true;
this.fetching = false;
if (opts.onInited) opts.onInited(this);
@@ -96,7 +98,11 @@ export default (opts) => ({
if (params && params.then) params = await params;
await this.$root.api(this.pagination.endpoint, {
limit: (this.pagination.limit || 10) + 1,
- untilId: this.items[this.items.length - 1].id,
+ ...(this.pagination.endpoint === 'notes/search' ? {
+ offset: this.offset,
+ } : {
+ untilId: this.items[this.items.length - 1].id,
+ }),
...params
}).then(x => {
if (x.length == (this.pagination.limit || 10) + 1) {
@@ -107,6 +113,7 @@ export default (opts) => ({
this.items = this.items.concat(x);
this.more = false;
}
+ this.offset += x.length;
this.moreFetching = false;
}, e => {
this.moreFetching = false;
diff --git a/src/client/app/store.ts b/src/client/app/store.ts
index f229a2b7b..6f545eb09 100644
--- a/src/client/app/store.ts
+++ b/src/client/app/store.ts
@@ -33,6 +33,7 @@ const defaultSettings = {
mutedWords: [],
gamesReversiShowBoardLabels: false,
gamesReversiUseAvatarStones: true,
+ disableAnimatedMfm: false,
};
const defaultDeviceSettings = {
diff --git a/src/config/types.ts b/src/config/types.ts
index c35bc6357..be3575d28 100644
--- a/src/config/types.ts
+++ b/src/config/types.ts
@@ -14,6 +14,7 @@ export type Source = {
db: string;
user: string;
pass: string;
+ disableCache?: boolean;
extra?: { [x: string]: string };
};
redis: {
diff --git a/src/db/postgre.ts b/src/db/postgre.ts
index f0f1e7eec..c91cd8e1d 100644
--- a/src/db/postgre.ts
+++ b/src/db/postgre.ts
@@ -96,7 +96,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
extra: config.db.extra,
synchronize: process.env.NODE_ENV === 'test' || sync,
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
- cache: {
+ cache: !config.db.disableCache ? {
type: 'redis',
options: {
host: config.redis.host,
@@ -107,7 +107,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
db: config.redis.db || 0
}
}
- },
+ } : false,
logging: log,
logger: log ? new MyCustomLogger() : undefined,
entities: [
diff --git a/src/models/entities/drive-file.ts b/src/models/entities/drive-file.ts
index 130af39ed..319bdc82c 100644
--- a/src/models/entities/drive-file.ts
+++ b/src/models/entities/drive-file.ts
@@ -72,6 +72,7 @@ export class DriveFile {
})
public properties: Record;
+ @Index()
@Column('boolean')
public storedInternal: boolean;
@@ -146,6 +147,7 @@ export class DriveFile {
/**
* 外部の(信頼されていない)URLへの直リンクか否か
*/
+ @Index()
@Column('boolean', {
default: false,
comment: 'Whether the DriveFile is direct link to remote server.'