How to use Server side cache

Hi all
I’m preparing a dash app. It consist of a data which is being imported from a sql server with pyodbc. the data consist of 500000 rows initially. but it keep increasing everyday as every minute a new line is added to that database. after importing the database some calculations are being done on the it with help of pandas and then they’re sent to two dropdowns which further updates other two dynamic dropdowns. after selecting the required data from the dropdowns they’re used to update 10 different type of graphs and two datatables. everything works really well. But there are few problems i want to share.

First it take time to update all the graphs when a new value in dropdown is selected.

Second is that i want to store the calculated data in the form of cache. i tried using a hidden div but due to a huge amount of data it failed. i wanna use to store the cache data in the user’s system without using redis or installing any other third party software. is there any way to do so? i read somewhere about server side caching. can anyone explain me how can i use it with a suitable example.

third i want my imported sql database and it’s calculations to be automatically updated every 30 seconds. Pls help if possible. also if anyone can provide a suitable example then it can be alot more helpful.

I’m using latest version of dash, pandas, numpy and pyodbc. I’m working on latest version of pycharm on a windows 10 system.

Thanks in advance.

I use flask-caching with Redis. It has a filesystem option as well, which doesn’t require a 3rd party integration.

Hi @cufflink
Thanks for your reply.
i don’t know how the redis work.
I wanna know that if i’m storing the cache data in Redis then do i have to install the Redis software on each and every system from which i would have to access the dash app?
can you provide a suitable example too.

You only need to installere Redis on the server, the clients just need a browser.