summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-02-17 08:21:06 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-02-17 08:21:06 -0500
commit26e44d9b32948693a035bea5cb31134526e01fe3 (patch)
treea7b218ecb6548c2af25de4f2f8b13260a86aac6c /store
parentda448cedc8329246e0a4bf027c161dcd15d29a36 (diff)
downloadchat-26e44d9b32948693a035bea5cb31134526e01fe3.tar.gz
chat-26e44d9b32948693a035bea5cb31134526e01fe3.tar.bz2
chat-26e44d9b32948693a035bea5cb31134526e01fe3.zip
Bumping base cache numbers for master (#5451)
Diffstat (limited to 'store')
-rw-r--r--store/sql_channel_store.go13
-rw-r--r--store/sql_emoji_store.go2
-rw-r--r--store/sql_file_info_store.go2
-rw-r--r--store/sql_user_store.go4
4 files changed, 10 insertions, 11 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index dfc77bd8a..503b646f6 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -25,11 +25,10 @@ const (
ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SIZE = model.SESSION_CACHE_SIZE
ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SEC = 900 // 15 mins
- CHANNEL_MEMBERS_COUNTS_CACHE_SIZE = 20000
- CHANNEL_MEMBERS_COUNTS_CACHE_SEC = 900 // 15 mins
+ CHANNEL_MEMBERS_COUNTS_CACHE_SIZE = model.CHANNEL_CACHE_SIZE
+ CHANNEL_MEMBERS_COUNTS_CACHE_SEC = 1800 // 30 mins
- CHANNEL_CACHE_SIZE = 5000
- CHANNEL_CACHE_SEC = 900 // 15 mins
+ CHANNEL_CACHE_SEC = 900 // 15 mins
)
type SqlChannelStore struct {
@@ -38,8 +37,8 @@ type SqlChannelStore struct {
var channelMemberCountsCache = utils.NewLru(CHANNEL_MEMBERS_COUNTS_CACHE_SIZE)
var allChannelMembersForUserCache = utils.NewLru(ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SIZE)
-var channelCache = utils.NewLru(CHANNEL_CACHE_SIZE)
-var channelByNameCache = utils.NewLru(CHANNEL_CACHE_SIZE)
+var channelCache = utils.NewLru(model.CHANNEL_CACHE_SIZE)
+var channelByNameCache = utils.NewLru(model.CHANNEL_CACHE_SIZE)
func ClearChannelCaches() {
channelMemberCountsCache.Purge()
@@ -361,7 +360,7 @@ func (s SqlChannelStore) get(id string, master bool, allowFromCache bool) StoreC
result.Err = model.NewLocAppError("SqlChannelStore.Get", "store.sql_channel.get.existing.app_error", nil, "id="+id)
} else {
result.Data = obj.(*model.Channel)
- channelCache.AddWithExpiresInSecs(id, obj.(*model.Channel), CHANNEL_MEMBERS_COUNTS_CACHE_SEC)
+ channelCache.AddWithExpiresInSecs(id, obj.(*model.Channel), CHANNEL_CACHE_SEC)
}
storeChannel <- result
diff --git a/store/sql_emoji_store.go b/store/sql_emoji_store.go
index e2bd00e0f..513cf3c3c 100644
--- a/store/sql_emoji_store.go
+++ b/store/sql_emoji_store.go
@@ -11,7 +11,7 @@ import (
const (
EMOJI_CACHE_SIZE = 5000
- EMOJI_CACHE_SEC = 1800 // 60 mins
+ EMOJI_CACHE_SEC = 1800 // 30 mins
)
var emojiCache *utils.Cache = utils.NewLru(EMOJI_CACHE_SIZE)
diff --git a/store/sql_file_info_store.go b/store/sql_file_info_store.go
index b1ad4b11a..c29ac461e 100644
--- a/store/sql_file_info_store.go
+++ b/store/sql_file_info_store.go
@@ -14,7 +14,7 @@ type SqlFileInfoStore struct {
const (
FILE_INFO_CACHE_SIZE = 25000
- FILE_INFO_CACHE_SEC = 900 // 15 minutes
+ FILE_INFO_CACHE_SEC = 1800 // 30 minutes
)
var fileInfoCache *utils.Cache = utils.NewLru(FILE_INFO_CACHE_SIZE)
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 7ca33fd78..68c1ffec7 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -19,9 +19,9 @@ import (
const (
MISSING_ACCOUNT_ERROR = "store.sql_user.missing_account.const"
MISSING_AUTH_ACCOUNT_ERROR = "store.sql_user.get_by_auth.missing_account.app_error"
- PROFILES_IN_CHANNEL_CACHE_SIZE = 5000
+ PROFILES_IN_CHANNEL_CACHE_SIZE = model.CHANNEL_CACHE_SIZE
PROFILES_IN_CHANNEL_CACHE_SEC = 900 // 15 mins
- PROFILE_BY_IDS_CACHE_SIZE = 20000
+ PROFILE_BY_IDS_CACHE_SIZE = model.SESSION_CACHE_SIZE
PROFILE_BY_IDS_CACHE_SEC = 900 // 15 mins
USER_SEARCH_OPTION_NAMES_ONLY = "names_only"
USER_SEARCH_OPTION_NAMES_ONLY_NO_FULL_NAME = "names_only_no_full_name"