-1

I am using a uwsgi-nginx based flask deployment (localhost) with a few worker processes(2 for now). Until now i had been using flask-Caching Simple Cache but recently i am in need of using a cache that would persist across processes. So i decided to use FileSystemCache instead, version 1.11.1(faulty cachelib integration? someone has already created an issue for it it seems) of flask-caching gave me some errors so i downgraded to 1.10.1.

After every few mins however i see cache misses happening again. My hypothesis with Simple Cache was maybe a different process/thread reached out to flask so the cache didn't hit. Is using FileSystemCache not the right way to go? Why would i observe this interaction, as mentioned in the screenshot, this was observed as soon as i refreshed my web app, so a bunch of new API's were called, they all route through a constructor that checks for the presence of a key in the cache, an auth token of sorts, and upon not finding it, prompts the user to login again. My problem is that users are having to login every few mins as the cache doesn't hit. I do not wanna use memcache/redis, already using those for production instance, this is more of a dev setup for developers in the team.

Logs screenshot of cache calling delete key somehow

1 Answers1

1

I found an answer. I was too distracted with the issues i faced earlier with flask-caching-1.11.1 and filesystem cache. After downgrading to 1.10.1, i just had to set a default timeout in the cache config to the desired value.