Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

Filesystem caching issue?



File System Cache
cache = Cache(app.server, config={
‘CACHE_TYPE’: ‘filesystem’,
‘CACHE_DIR’: ‘cache-directory’

TIMEOUT = 3600

def downloads():
df = get_downloads()
df[‘year_month’] = df[‘TIMESTAMP’].dt.strftime(’%Y-%m’)
df[‘Year_temp’] = df[‘TIMESTAMP’].dt.strftime(’%Y’)
df.loc[:, ‘week_temp’] = df.loc[:, ‘TIMESTAMP’].apply(lambda x: ‘%02d’ % x.weekofyear)
df[‘year_week’] = df[‘Year_temp’].str.cat(df[‘week_temp’], sep=’_’)
return df

I need to call the function several times because I need to calculate the no of downloads everytime a user uses the dashboard. It used to work