我的基于Django的应用程序正在执行以下步骤
从XLS读取数百万条记录并将数据放入缓存
cache.set((str(run)+“trn_data”),文件['inp_data'],3600)
缓存中存储的数据经过优化并再次存储在缓存中
cache.set((str(run)+“tier”),tier,3600)}
数据从缓存中提取并放入数据库
tier=cache.get((str(runid)+“tier”)
我所面临的问题是,Django-Dev服务器上的一切都正常工作,但一旦我在Apache(mod_-wsgi和Apache)上托管了应用程序,缓存就会显示为空(在步骤3)
另外,我在应用程序中使用本地Mem缓存
本地内存缓存是每个进程的缓存。见警告in the docs(我的重点):
对于生产,我建议您使用不同的缓存后端,例如Memcached
相关问题 更多 >
编程相关推荐