Don't cache dynamic realms in the ObjectStore cache either
This commit is contained in:
parent
06ce25053d
commit
c6d82ad436
|
@ -29,7 +29,7 @@ using namespace realm;
|
|||
|
||||
RealmCache Realm::s_global_cache;
|
||||
|
||||
Realm::Config::Config(const Config& c) : path(c.path), read_only(c.read_only), in_memory(c.in_memory), schema_version(c.schema_version), migration_function(c.migration_function)
|
||||
Realm::Config::Config(const Config& c) : path(c.path), read_only(c.read_only), in_memory(c.in_memory), cache(c.cache), schema_version(c.schema_version), migration_function(c.migration_function)
|
||||
{
|
||||
if (c.schema) {
|
||||
schema = std::make_unique<Schema>(*c.schema);
|
||||
|
@ -132,7 +132,9 @@ SharedRealm Realm::get_shared_realm(Config &config)
|
|||
realm->update_schema(*realm->m_config.schema, realm->m_config.schema_version);
|
||||
}
|
||||
|
||||
if (config.cache) {
|
||||
s_global_cache.cache_realm(realm, realm->m_thread_id);
|
||||
}
|
||||
return realm;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace realm {
|
|||
std::string path;
|
||||
bool read_only = false;
|
||||
bool in_memory = false;
|
||||
bool cache = true;
|
||||
std::unique_ptr<char[]> encryption_key;
|
||||
|
||||
std::unique_ptr<Schema> schema;
|
||||
|
|
Loading…
Reference in New Issue