Hi all testerossa!
Straight to the point: there is, for example, N number of functions:
def main_function():
# Request and receive data
def function1():
data = main_function()
def function2():
data = main_function()
def function3():
data = main_function()
Functions are called every 10 seconds, so the speed should be optimized as quickly as possible. Function
main_function()making the request is a precious 3 seconds and I don't want every time to re-trigger it.
What is the most optimal way to store such data?
1) writing to a file and reading it - just not a quick procedure.
2) Connect some Redis for this - it will be too.
3) Use a class instead of functions is also inconvenient because between the functions is the definition of the variables.