mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 15:06:33 -05:00
Update the secondary group cache (#1492)
* Use concurrent_flat_map to build a global cache rather than per thread. * Create global maintanence thread manager for clearing unused cache entries.
This commit is contained in:
parent
9e626228be
commit
f852474073
17 changed files with 342 additions and 246 deletions
65
src/config_gidcache.cpp
Normal file
65
src/config_gidcache.cpp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#include "config_gidcache.hpp"
|
||||
|
||||
#include "gidcache.hpp"
|
||||
|
||||
#include "to_string.hpp"
|
||||
#include "from_string.hpp"
|
||||
|
||||
|
||||
GIDCacheExpireTimeout::GIDCacheExpireTimeout(const int i_)
|
||||
{
|
||||
GIDCache::expire_timeout = i_;
|
||||
}
|
||||
|
||||
GIDCacheExpireTimeout::GIDCacheExpireTimeout(const std::string &s_)
|
||||
{
|
||||
from_string(s_);
|
||||
}
|
||||
|
||||
std::string
|
||||
GIDCacheExpireTimeout::to_string(void) const
|
||||
{
|
||||
return str::to(GIDCache::expire_timeout);
|
||||
}
|
||||
|
||||
int
|
||||
GIDCacheExpireTimeout::from_string(const std::string &s_)
|
||||
{
|
||||
int rv;
|
||||
|
||||
rv = str::from(s_,&GIDCache::expire_timeout);
|
||||
if(rv < 0)
|
||||
return rv;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
GIDCacheRemoveTimeout::GIDCacheRemoveTimeout(const int i_)
|
||||
{
|
||||
GIDCache::remove_timeout = i_;
|
||||
}
|
||||
|
||||
|
||||
GIDCacheRemoveTimeout::GIDCacheRemoveTimeout(const std::string &s_)
|
||||
{
|
||||
from_string(s_);
|
||||
}
|
||||
|
||||
std::string
|
||||
GIDCacheRemoveTimeout::to_string(void) const
|
||||
{
|
||||
return str::to(GIDCache::remove_timeout);
|
||||
}
|
||||
|
||||
int
|
||||
GIDCacheRemoveTimeout::from_string(const std::string &s_)
|
||||
{
|
||||
int rv;
|
||||
|
||||
rv = str::from(s_,&GIDCache::remove_timeout);
|
||||
if(rv < 0)
|
||||
return rv;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue