Merge pull request #1341 from gaul/stat-cache/default

Change default stat_cache_expire
This commit is contained in:
Takeshi Nakatani 2020-07-26 23:54:14 +09:00 committed by GitHub
commit 63bbb47378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -158,10 +158,10 @@ specify the maximum number of keys returned by S3 list object API. The default i
\fB\-o\fR max_stat_cache_size (default="100,000" entries (about 40MB)) \fB\-o\fR max_stat_cache_size (default="100,000" entries (about 40MB))
maximum number of entries in the stat cache and symbolic link cache. maximum number of entries in the stat cache and symbolic link cache.
.TP .TP
\fB\-o\fR stat_cache_expire (default is no expire) \fB\-o\fR stat_cache_expire (default is 900)
specify expire time (seconds) for entries in the stat cache and symbolic link cache. This expire time indicates the time since cached. specify expire time (seconds) for entries in the stat cache and symbolic link cache. This expire time indicates the time since cached.
.TP .TP
\fB\-o\fR stat_cache_interval_expire (default is no expire) \fB\-o\fR stat_cache_interval_expire (default is 900)
specify expire time (seconds) for entries in the stat cache and symbolic link cache. This expire time is based on the time from the last access time of those cache. specify expire time (seconds) for entries in the stat cache and symbolic link cache. This expire time is based on the time from the last access time of those cache.
This option is exclusive with stat_cache_expire, and is left for compatibility with older versions. This option is exclusive with stat_cache_expire, and is left for compatibility with older versions.
.TP .TP

View File

@ -160,7 +160,7 @@ pthread_mutex_t StatCache::stat_cache_lock;
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Constructor/Destructor // Constructor/Destructor
//------------------------------------------------------------------- //-------------------------------------------------------------------
StatCache::StatCache() : IsExpireTime(false), IsExpireIntervalType(false), ExpireTime(0), CacheSize(100000), IsCacheNoObject(false) StatCache::StatCache() : IsExpireTime(false), IsExpireIntervalType(false), ExpireTime(15 * 60), CacheSize(100000), IsCacheNoObject(false)
{ {
if(this == StatCache::getStatCacheData()){ if(this == StatCache::getStatCacheData()){
stat_cache.clear(); stat_cache.clear();

View File

@ -1258,12 +1258,12 @@ void show_help ()
" - maximum number of entries in the stat cache, and this maximum is\n" " - maximum number of entries in the stat cache, and this maximum is\n"
" also treated as the number of symbolic link cache.\n" " also treated as the number of symbolic link cache.\n"
"\n" "\n"
" stat_cache_expire (default is no expire)\n" " stat_cache_expire (default is 900))\n"
" - specify expire time (seconds) for entries in the stat cache.\n" " - specify expire time (seconds) for entries in the stat cache.\n"
" This expire time indicates the time since stat cached. and this\n" " This expire time indicates the time since stat cached. and this\n"
" is also set to the expire time of the symbolic link cache.\n" " is also set to the expire time of the symbolic link cache.\n"
"\n" "\n"
" stat_cache_interval_expire (default is no expire)\n" " stat_cache_interval_expire (default is 900)\n"
" - specify expire time (seconds) for entries in the stat cache(and\n" " - specify expire time (seconds) for entries in the stat cache(and\n"
" symbolic link cache).\n" " symbolic link cache).\n"
" This expire time is based on the time from the last access time\n" " This expire time is based on the time from the last access time\n"