You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all loaders are executed again every time we
switch namespaces using settings.using_namespace or settings.namespace
when a variable is marked as always_fresh
when using `settings.get('var', fresh=True)
For the fresh=True and always_fresh it makes sense to execute loaders again as it is demanded to get the fresh variable (lets say from redis or another database).
The problem is that it may cause overhead (I guess not too much) but in any case we can improve by.
writing more namespace tests (with more switching and fresh examples)
implement a cache on execute_loaders so files and databases are not accessed twice when we are only switching namespaces and not wanting to load all again.
Part of this is already implemented in loaded_by_loaders dictionary, we just need to use this as a cache point.
The text was updated successfully, but these errors were encountered:
Currently, all loaders are executed again every time we
settings.using_namespace
orsettings.namespace
always_fresh
For the
fresh=True
andalways_fresh
it makes sense to execute loaders again as it is demanded to get the fresh variable (lets say from redis or another database).The problem is that it may cause overhead (I guess not too much) but in any case we can improve by.
fresh
examples)execute_loaders
so files and databases are not accessed twice when we are only switching namespaces and not wanting to load all again.Part of this is already implemented in
loaded_by_loaders
dictionary, we just need to use this as a cache point.The text was updated successfully, but these errors were encountered: