﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20536	File based cache is not safe for concurrent processes	Jaap Roes	Jaap Roes	"Django's FileBasedCache is not safe for concurrent processes (as mentioned in the thread [https://groups.google.com/forum/#!msg/django-developers/PCgYCInrL0g/Hnr5x2FDNhYJ Is file based cache is safe for concurrent process?] on django-developers)

I've attached a simple python script that demonstrates the issue consistently (on my PC) and also provides an alternative implementation of the `set` method based on the werkzeug's filesystem cache.

I'm wondering if the approach I used to demonstrate the issue is suitable for use within Django's testsuite and if the tempfile write through approach is an acceptable solution (it makes writing to the cache slightly slower).

P.S. ""The file based cache is primarily there as a proof of concept""

This is not well documented and I suspect a fair amount of people are using it in production scenarios."	Bug	closed	Core (Cache system)	dev	Normal	fixed	filebasedcache concurrency unicodeerror	k@…	Accepted	1	0	0	1	0	0
